Antwort
 
LinkBack Themen-Optionen Thema durchsuchen Thema bewerten Ansicht
  #1  
Alt 24.07.07, 12:02
Forum Aktivist
 
Registriert seit: 03.07.07
Beiträge: 82
Problem mit RealURL und tt_news - HILFE

Hallo,

also bei mir funktioniert RealURL alles super. Außer wenn ich auf die Newsübersicht gehe und dort einen Newsartikel auswähle...

Ich bekomme dann folgenden Fehler:
Error!

Reason: Segment "news" was not a keyword for a postVarSet as expected!

Hier ist meine RealURL config von der localconf.php

PHP-Code:
<?php
$TYPO3_CONF_VARS
['SC_OPTIONS'] ['t3lib/class.t3lib_tstemplate.php'] ['linkData-PostProc'] []
'EXT:realurl/class.tx_realurl.php:&tx_realurl->encodeSpURL';
$TYPO3_CONF_VARS['SC_OPTIONS'] ['tslib/class.tslib_fe.php'] ['checkAlternativeIdMethods-PostProc'] []
'EXT:realurl/class.tx_realurl.php:&tx_realurl->decodeSpURL';
$TYPO3_CONF_VARS['SC_OPTIONS'] ['t3lib/class.t3lib_tcemain.php'] ['clearAllCache_additionalTables'] ['tx_realurl_urldecodecache']
'tx_realurl_urldecodecache';
$TYPO3_CONF_VARS['SC_OPTIONS'] ['t3lib/class.t3lib_tcemain.php'] ['clearAllCache_additionalTables'] ['tx_realurl_urlencodecache']
'tx_realurl_urlencodecache';
$TYPO3_CONF_VARS['FE'] ['addRootLineFields'] .=
',tx_realurl_pathsegment,alias,nav_title,title';
$TYPO3_CONF_VARS['EXTCONF'] ['realurl'] ['_DEFAULT'] = array(
'init' => array(
'enableCHashCache' => 1,
'enableUrlDecodeCache' => 1,
'enableUrlEncodeHash' => 1,
// 'postVarSet_failureMode' => 'redirect_goodUpperDir',
),
'rewrite' => array(
),
'preVars' => array(
/*
array(
'GETvar' => 'L',
'valueMap' => array(
'de' => '0',
'en' => '1',
'valueDefault' => 'de',
),
),
*/
),
'pagePath' => array(
'type' => 'user',
'userFunc' => 'EXT:realurl/class.tx_realurl_advanced.php:&tx_realurl_advanced->main',
'spaceCharacter' => '-',
'languageGetVar' => 'L',
'firstHitPathCache' => 1,
'expireDays' => 3,
'rootpage_id' => '4'
),
'fileName' => array (
'defaultToHTMLsuffixOnPrev' => 1,
'index' => array(
'page.html' => array(
'keyValues' => array (
'type' => 1,
),
),
),
),
'fixedPostVarSets' => array(
),
'postVarSets' => array(
'_DEFAULT' => array(
//archive
'period' => array (
array (
'condPrevValue' => -1,
'GETvar' => 'tx_ttnews[pS]',
//'valueMap => array()
),
array (
'GETvar' => 'tx_ttnews[pL]',
//'valueMap => array()
),

array (
'GETvar' => 'tx_ttnews[arc]',
'valueMap' => array(
'non-archived' => -1,
),
),
),

'browse' => array (
array (
'GETvar' => 'tx_ttnews[pointer]',
),
),
'select' => array (
array (
'GETvar' => 'tx_ttnews[cat]',
'lookUpTable' => array (
'table' => 'tt_news_cat',
'id_field' => 'uid',
'alias_field' => 'title',
'addWhereClause'=> 'AND NOT deleted',
'useUniqueCache'=> 1,
'useUniqueCache_conf' => array (
'strtolower' => 1,
'spaceCharacter' => '-',
),
),
),
),
'article' => array( 
array (
'GETvar' => 'tx_ttnews[backPid]',
// 'valueMap => array(
// ),
),
array (
'GETvar' => 'tx_ttnews[tt_news]',
'lookUpTable' => array (
'table' => 'tt_news',
'id_field' => 'uid',
'alias_field' => 'title',
'maxLength' => 12,
'addWhereClause'=> 'AND NOT deleted',
'useUniqueCache'=> 1,
'useUniqueCache_conf' => array (
'strtolower' => 1,
'spaceCharacter' => '-',
),
),
),
),
),
), 
);
?>
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!Spurl this Post!Reddit! Diesen Post bei linksilo.de bookmarken!
Mit Zitat antworten
  #2  
Alt 24.07.07, 16:10
Forum Aktivist
 
Registriert seit: 03.07.07
Beiträge: 82

Ich hab es nochmal komplett auseinander genommen. Vielleicht hilft es jemanden. Nach 3 Stunden Try and Fail und 1 Stunde Verzweiflungsschreie kam das raus:

PHP-Code:
/**
* Real Url config for tt_news
*
*/

$TYPO3_CONF_VARS['EXTCONF']['realurl'] = array(
    
'_DEFAULT' => array(
        
'init' => array(
            
'enableCHashCache' => 1,
            
'appendMissingSlash' => 'ifNotFile',
            
'enableUrlDecodeCache' => 1,
            
'enableUrlEncodeCache' => 1,
        ),
        
'redirects' => array(),
        
'preVars' => array(
            array(
                
'GETvar' => 'no_cache',
                
'valueMap' => array(
                    
'nc' => 1,
                ),
                
'noMatch' => 'bypass',
            ),
            array(
                
'GETvar' => 'L',
                
'valueMap' => array(
                    
'dk' => '2',
                    
'de' => '1',
                ),
                
'noMatch' => 'bypass',
            ),
        ),
        
'pagePath' => array(
            
'type' => 'user',
            
'userFunc' => 'EXT:realurl/class.tx_realurl_advanced.php:&tx_realurl_advanced->main',
            
'spaceCharacter' => '-',
            
'languageGetVar' => 'L',
            
'expireDays' => 7,
            
'rootpage_id' => 472,
        ),
        
'fixedPostVars' => array(),
        
'postVarSets' => array(
            
'_DEFAULT' => array(
                
// news archive parameters
                
'archive' => array(
                    array(
                        
'GETvar' => 'tx_ttnews[year]' ,
                        ),
                    array(
                        
'GETvar' => 'tx_ttnews[month]' ,
                           
'valueMap' => array(
                            
'january' => '01',
                            
'february' => '02',
                            
'march' => '03',
                            
'april' => '04',
                            
'may' => '05',
                            
'june' => '06',
                            
'july' => '07',
                            
'august' => '08',
                            
'september' => '09',
                            
'october' => '10',
                            
'november' => '11',
                            
'december' => '12',
                               )
                        ),
                    ),
                
// news pagebrowser
                
'browse' => array(
                    array(
                        
'GETvar' => 'tx_ttnews[pointer]',
                        ),
                    ),
                
// news categories
                
'select_category' => array (
                    array(
                        
'GETvar' => 'tx_ttnews[cat]',
                        ),
                    ),
                
// news articles and searchwords
                
'article' => array(
                    array(
                        
'GETvar' => 'tx_ttnews[tt_news]',
                        
'lookUpTable' => array(
                            
'table' => 'tt_news',
                            
'id_field' => 'uid',
                            
'alias_field' => 'title',
                            
'addWhereClause' => ' AND NOT deleted',
                            
'useUniqueCache' => 1,
                            
'useUniqueCache_conf' => array(
                                
'strtolower' => 1,
                                
'spaceCharacter' => '-',
                                ),
                            ),
                        ),
                    array(
                        
'GETvar' => 'tx_ttnews[swords]',
                        ),
                    ),
                ),
            ),
        
// configure filenames for different pagetypes
        
'fileName' => array(
            
'index' => array(
                
'rss.xml' => array(
                    
'keyValues' => array(
                        
'type' => 100,
                    ),
                ),
                
'rss091.xml' => array(
                    
'keyValues' => array(
                        
'type' => 101,
                     ),
                ),
                
'rdf.xml' => array(
                    
'keyValues' => array(
                        
'type' => 102,
                    ),
                ),
                
'atom.xml' => array(
                    
'keyValues' => array(
                        
'type' => 103,
                    ),
                ),
            ),
        ),
    ),
); 
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!Spurl this Post!Reddit! Diesen Post bei linksilo.de bookmarken!
Mit Zitat antworten
  #3  
Alt 26.07.07, 22:40
Forum Newbie
 
Registriert seit: 22.07.07
Beiträge: 13

Hallo,

habe es eins zu eins übernommen, leider funktioniert es bei mir überhaupt nicht. Die "normalen" Seiten werden zwar korrekt vom Namen her umgesetzt, aber beim Aufruf kommt 404. Dto. bei den tt_news Kategorien; bei den einzelnen Artikeln wird auch der Seitenname nicht erzeugt, d.h. es wird "?tx_ttnews[backPid]=13&cHash=..." drangehängt, und beim Aufruf kommt ebenfalls 404.

Vielleicht kannst du mal einen Blick drauf werfen, falls ich mich unklar ausgedrückt habe: Lernen heute: Lernen heute

Werde es sonst wieder auf simulateStaticDocuments umstellen müssen

Danke und Gruß

Zitat:
Zitat von Aldarin Beitrag anzeigen
Ich hab es nochmal komplett auseinander genommen. Vielleicht hilft es jemanden. Nach 3 Stunden Try and Fail und 1 Stunde Verzweiflungsschreie kam das raus:

PHP-Code:
/**
* Real Url config for tt_news
*
*/

$TYPO3_CONF_VARS['EXTCONF']['realurl'] = array(
    
'_DEFAULT' => array(
        
'init' => array(
            
'enableCHashCache' => 1,
            
'appendMissingSlash' => 'ifNotFile',
            
'enableUrlDecodeCache' => 1,
            
'enableUrlEncodeCache' => 1,
        ),
        
'redirects' => array(),
        
'preVars' => array(
            array(
                
'GETvar' => 'no_cache',
                
'valueMap' => array(
                    
'nc' => 1,
                ),
                
'noMatch' => 'bypass',
            ),
            array(
                
'GETvar' => 'L',
                
'valueMap' => array(
                    
'dk' => '2',
                    
'de' => '1',
                ),
                
'noMatch' => 'bypass',
            ),
        ),
        
'pagePath' => array(
            
'type' => 'user',
            
'userFunc' => 'EXT:realurl/class.tx_realurl_advanced.php:&tx_realurl_advanced->main',
            
'spaceCharacter' => '-',
            
'languageGetVar' => 'L',
            
'expireDays' => 7,
            
'rootpage_id' => 472,
        ),
        
'fixedPostVars' => array(),
        
'postVarSets' => array(
            
'_DEFAULT' => array(
                
// news archive parameters
                
'archive' => array(
                    array(
                        
'GETvar' => 'tx_ttnews[year]' ,
                        ),
                    array(
                        
'GETvar' => 'tx_ttnews[month]' ,
                           
'valueMap' => array(
                            
'january' => '01',
                            
'february' => '02',
                            
'march' => '03',
                            
'april' => '04',
                            
'may' => '05',
                            
'june' => '06',
                            
'july' => '07',
                            
'august' => '08',
                            
'september' => '09',
                            
'october' => '10',
                            
'november' => '11',
                            
'december' => '12',
                               )
                        ),
                    ),
                
// news pagebrowser
                
'browse' => array(
                    array(
                        
'GETvar' => 'tx_ttnews[pointer]',
                        ),
                    ),
                
// news categories
                
'select_category' => array (
                    array(
                        
'GETvar' => 'tx_ttnews[cat]',
                        ),
                    ),
                
// news articles and searchwords
                
'article' => array(
                    array(
                        
'GETvar' => 'tx_ttnews[tt_news]',
                        
'lookUpTable' => array(
                            
'table' => 'tt_news',
                            
'id_field' => 'uid',
                            
'alias_field' => 'title',
                            
'addWhereClause' => ' AND NOT deleted',
                            
'useUniqueCache' => 1,
                            
'useUniqueCache_conf' => array(
                                
'strtolower' => 1,
                                
'spaceCharacter' => '-',
                                ),
                            ),
                        ),
                    array(
                        
'GETvar' => 'tx_ttnews[swords]',
                        ),
                    ),
                ),
            ),
        
// configure filenames for different pagetypes
        
'fileName' => array(
            
'index' => array(
                
'rss.xml' => array(
                    
'keyValues' => array(
                        
'type' => 100,
                    ),
                ),
                
'rss091.xml' => array(
                    
'keyValues' => array(
                        
'type' => 101,
                     ),
                ),
                
'rdf.xml' => array(
                    
'keyValues' => array(
                        
'type' => 102,
                    ),
                ),
                
'atom.xml' => array(
                    
'keyValues' => array(
                        
'type' => 103,
                    ),
                ),
            ),
        ),
    ),
); 
__________________
Danke und Gruß
Andreas
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!Spurl this Post!Reddit! Diesen Post bei linksilo.de bookmarken!
Mit Zitat antworten
  #4  
Alt 27.07.07, 04:05
Benutzerbild von tom
tom tom ist offline
TYPO3 Forum Team
Moderator
 
Registriert seit: 11.09.04
Ort: Schillerstadt Marbach
Alter: 40
Beiträge: 786
tom eine Nachricht über ICQ schicken tom eine Nachricht über Skype™ schicken

mir scheint bei Dir ist modewrite nicht aktiviert oder die .htacess-Datei fehlt oder ist fehlerhaft.

Kannst Du das mal nachprüfen ?

Tom
__________________
"Wer nichts anderes tut als Geld verdienen, verdient auch nichts anderes ..."

P.S. Ich habe gerade beschlossen alle meine Tipp- und Rechtschreibfehler unter die Open Content License zu stellen.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!Spurl this Post!Reddit! Diesen Post bei linksilo.de bookmarken!
Mit Zitat antworten
  #5  
Alt 27.07.07, 06:12
Forum Aktivist
 
Registriert seit: 03.07.07
Beiträge: 82

also die _htaccess ist vorhanden und auch modrewrite (letzteres hatte ich selber auf den rechner konfiguriert, daher bin ich mir da sicher).
die ganze sache funktioniert nun auch, mit dem zuletzt geposteten file + löschen der realurl caches.

kurze frage am rande... gibts auch ne extension die für mich den realurl-cache löscht? weil das stresst dann doch recht stark, wenn man das 10-20 mal löschen muss bei den testläufen.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!Spurl this Post!Reddit! Diesen Post bei linksilo.de bookmarken!
Mit Zitat antworten
  #6  
Alt 27.07.07, 07:07
Forum Newbie
 
Registriert seit: 22.07.07
Beiträge: 13

Zitat:
Zitat von tom Beitrag anzeigen
mir scheint bei Dir ist modewrite nicht aktiviert oder die .htacess-Datei fehlt oder ist fehlerhaft.

Kannst Du das mal nachprüfen ?

Tom
meine .htaccess sieht so aus:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^[^/]*\.html$ index.php

kann es sein, dass eine Regel für Namen die nicht auf html enden fehlt? Immerhin lautet die linkadresse, die RealURL erzeugt <domain>/seite und nicht <domain>/seite.html.
Ich kenn mich mit Apache-Konfiguration so gar nicht aus und habe die .htaccess auch nur auf Grund eines anderen Beitrags aktiviert (umbenannt von _htacess).
__________________
Danke und Gruß
Andreas
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!Spurl this Post!Reddit! Diesen Post bei linksilo.de bookmarken!
Mit Zitat antworten
  #7  
Alt 27.07.07, 12:06
Forum Aktivist
 
Registriert seit: 03.07.07
Beiträge: 82

Welche der Varianten hast du verwendet?

Die letzte Version sollte funktionieren. Ich kann, wenn ich von der Arbeit heimkomme noch die die ich aktuell verwende posten. Die sollte aber gleich sein, weiß grad nicht ob ich danach noch eine zeile hinzugefügt habe.

bei mir werden die .htmls angehängt.

hat die htaccess eigentlich eine sicherheitsfunktion bei realurl oder ist sie nur für die rewrite optionen notwendig?

grüße,
daniel

P.S.
hast du deine Rootpage eingtragen?
'rootpage_id' => '4'

Im übrigen ist die Konfig von dem letzten beitrag nur für tt_news...
das andere drum herum. die grundkonfig brauchst du noch aus dem 1. posting.

hier ist nochmal der gesamtcode:
PHP-Code:
<?php
$TYPO3_CONF_VARS
['SC_OPTIONS'] ['t3lib/class.t3lib_tstemplate.php'] ['linkData-PostProc'] []
'EXT:realurl/class.tx_realurl.php:&tx_realurl->encodeSpURL';
$TYPO3_CONF_VARS['SC_OPTIONS'] ['tslib/class.tslib_fe.php'] ['checkAlternativeIdMethods-PostProc'] []
'EXT:realurl/class.tx_realurl.php:&tx_realurl->decodeSpURL';
$TYPO3_CONF_VARS['SC_OPTIONS'] ['t3lib/class.t3lib_tcemain.php'] ['clearAllCache_additionalTables'] ['tx_realurl_urldecodecache']
'tx_realurl_urldecodecache';
$TYPO3_CONF_VARS['SC_OPTIONS'] ['t3lib/class.t3lib_tcemain.php'] ['clearAllCache_additionalTables'] ['tx_realurl_urlencodecache']
'tx_realurl_urlencodecache';
$TYPO3_CONF_VARS['FE'] ['addRootLineFields'] .=
',tx_realurl_pathsegment,alias,nav_title,title';
$TYPO3_CONF_VARS['EXTCONF'] ['realurl'] ['_DEFAULT'] = array(
'init' => array(
'enableCHashCache' => 1,
'enableUrlDecodeCache' => 1,
'enableUrlEncodeHash' => 1,
// 'postVarSet_failureMode' => 'redirect_goodUpperDir',
),
'rewrite' => array(
),
'preVars' => array(
/*
array(
'GETvar' => 'L',
'valueMap' => array(
'de' => '0',
'en' => '1',
'valueDefault' => 'de',
),
),
*/
),
'pagePath' => array(
'type' => 'user',
'userFunc' => 'EXT:realurl/class.tx_realurl_advanced.php:&tx_realurl_advanced->main',
'spaceCharacter' => '-',
'languageGetVar' => 'L',
'expireDays' => 3,
'rootpage_id' => '4'
),
'fileName' => array (
'defaultToHTMLsuffixOnPrev' => 1,
'index' => array(
'page.html' => array(
'keyValues' => array (
'type' => 1,
),
),
),
),
'fixedPostVarSets' => array(
),
'postVarSets' => array(
'_DEFAULT' => array(
//archive
'period' => array (
array (
'condPrevValue' => -1,
'GETvar' => 'tx_ttnews[pS]',
//'valueMap => array()
),
array (
'GETvar' => 'tx_ttnews[pL]',
//'valueMap => array()
),

array (
'GETvar' => 'tx_ttnews[arc]',
'valueMap' => array(
'non-archived' => -1,
),
),
),

'browse' => array (
array (
'GETvar' => 'tx_ttnews[pointer]',
),
),
'select' => array (
array (
'GETvar' => 'tx_ttnews[cat]',
'lookUpTable' => array (
'table' => 'tt_news_cat',
'id_field' => 'uid',
'alias_field' => 'title',
'addWhereClause'=> 'AND NOT deleted',
'useUniqueCache'