[TYPO3-german] RealURL: Segment was not a keyword for a postVarSet as expected!

Johannes Dörr groups at johannesdoerr.de
Fri Jun 12 12:32:22 CEST 2009


Hi,
ich habe ein seltsames Problem. Ich setzte die Extension dr_blob ein 
(eine Dateiansicht) und möchte dafür RealURL konfigurieren.

Für das Anzeigen von Dateien, wird der Parameter tx_drblob_pi1[pid] 
verwendet, somit habe ich entsprechend folgendes in die Konfiguration 
eingefügt:

'folder' => array(
   '0' => array(
     'GETvar' => 'tx_drblob_pi1[pid]',
     'lookUpTable' => array (
        # ...
     ),
   ),
),

Das funktioniert super. Allerdings habe ich ein Problem beim Download 
von Dateien. Der Parameter lautet dabei tx_drblob_pi1[downloadUid], deshalb:

'file' => array(
   '0' => array(
     'GETvar' => 'tx_drblob_pi1[downloadUid]',
   ),
),

Damit wird der Download-Link 
http://new.physics.johannesdoerr.de/nc/files/62.html erzeugt. Aber wenn 
ich darauf klicke, kommt die Meldung

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

Kann mir jemand sagen, woran das liegt? Hat das etwas mit dem cache zu 
tun? Auch wenn ich das nc aus der Domain weglasse, kommt dieselbe Meldung.

Wenn ich hingegen aus der Konfiguration den file-Teil weglasse und somit 
die URL 
http://new.physics.johannesdoerr.de/nc.html?tx_drblob_pi1[downloadUid]=61
erzeugt wird, funktionierts.

Ich verstehe nicht, was hier schief läuft. Weiß jemand Rat?

Meine gesamte Konfiguration:

<?php

function getRootPageIDs($a) {
     return $a['pagePath']['rootpage_id'];
}

function user_encodeSpURL(&$params, &$ref) {
     $domains = array_filter(array_map('getRootPageIDs', 
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['realurl']));
     unset($domains['_DEFAULT']);
     $domains = array_flip($domains);
     foreach 
($GLOBALS['TSFE']->sys_page->getRootline($params['params']['args']['page']['uid']) 
as $index => $value) {
         if (isset($domains[$value['uid']])) {
             $params['URL'] = 
'http://'.$domains[$value['uid']].'/'.$params['URL'];
             break;
         }
     }
}

$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['realurl'] = array (
     'encodeSpURL_postProc' => array('user_encodeSpURL'),
     '_DEFAULT' => array (
         'init' => array (
             'enableCHashCache' => '1',
             'appendMissingSlash' => 'ifNotFile',
             'enableUrlDecodeCache' => '1',
             'enableUrlEncodeCache' => '1',
         ),
         'redirects' => array (
         ),
         'preVars' => array (
             '0' => array (
                 'GETvar' => 'no_cache',
                 'valueMap' => array (
                     'nc' => '1',
                 ),
                 'noMatch' => 'bypass'
             ),
             '1' => array (
                 'GETvar' => 'L',
                 'valueMap' => array (
                     'de' => '0',
                     'en' => '1',
                 ),
                 'noMatch' => 'bypass',
             ),
             '2' => array (
                 'GETvar' => 'lang',
                 'valueMap' => array (
                     'de' => 'de',
                     'en' => 'en',
                 ),
                 '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' => '1',
#            'firstHitPathCache' => '1',
         ),
         'fixedPostVars' => array (
         ),
         'postVarSets' => array (
             '_DEFAULT' => array (
                 'archive' => array (
                     '0' => array (
                         'GETvar' => 'tx_ttnews[year]',
                     ),
                     '1' => 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',
                         ),
                     ),
                 ),
                 'browse' => array (
                     '0' => array (
                         'GETvar' => 'tx_ttnews[pointer]',
                     ),
                 ),
                 'select_category' => array (
                     '0' => array (
                         'GETvar' => 'tx_ttnews[cat]',
                     ),
                 ),
                 'article' => array (
                     '0' => 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' => '-',
                             ),
                         ),
                     ),
                     '1' => array (
                         'GETvar' => 'tx_ttnews[swords]',
                     ),
                 ),

                 'folder' => array(
                     '0' => array(
                         'GETvar' => 'tx_drblob_pi1[pid]',
                         'lookUpTable' => array (
                             'table' => 'pages',
                             'id_field' => 'uid',
                             'alias_field' => 'title',
                             'addWhereClause' => ' AND NOT deleted',
                             'useUniqueCache' => '1',
                             'useUniqueCache_conf' => array (
                                 'strtolower' => '1',
                                 'spaceCharacter' => '-',
                             ),
                             'noMatch' => 'bypass',
                         ),
                     ),
                 ),

                 'files' => array(
                     'keyValues' => array(
                         'GETvar' => 'tx_drblob_pi1[downloadUid]',
                     ),
                 ),

                 'blog-post' => array(
                     'year' => array(
                         'GETvar' => 'tx_t3blog_pi1[blogList][year]',
                     ),
                     'month' => array(
                         'GETvar' => 'tx_t3blog_pi1[blogList][month]' ,
                     ),
                     'day' => array(
                         'GETvar' => 'tx_t3blog_pi1[blogList][day]',
                     ),				
                     'entry' => array (
                         'GETvar' => 'tx_t3blog_pi1[blogList][showUid]',
                         'lookUpTable' => array(
                             'table' => 'tx_t3blog_post',
                             'id_field' => 'uid',
                             'alias_field' => 'title',
                             'addWhereClause' => ' AND NOT deleted AND 
NOT hidden',
                             'useUniqueCache' => 1,
                             'useUniqueCache_conf' => array(
                                 'strtolower' => 1,
                                 'spaceCharacter' => '-',
                             ),
                         ),						
                     ),
                 ),
                 'blog-permanent' => array(
                     'page' => array(
                         'GETvar' => 
'tx_t3blog_pi1[blogList][showUidPerma]',
                     ),
                 ),
                 'blog-pages' => array(
                     'page' => array(
                         'GETvar' => 'tx_t3blog_post_pointer',
                     ),
                 ),
                 'blog-category' => array (
                     'cat' => array (						
                         'GETvar' => 'tx_t3blog_pi1[blogList][category]',
                         'lookUpTable' => array (
                             'table' => 'tx_t3blog_cat',
                             'id_field' => 'uid',
                             'alias_field' => 'catname',
                             'addWhereClause' => ' AND NOT deleted AND 
NOT hidden',
                             'useUniqueCache' => 1,
                             'useUniqueCache_conf' => array(
                                 'strtolower' => 1,
                                 'spaceCharacter' => '-',
                             ),
                         ),
                     )
                 ),				
                 'blog-from' => array (
                     'from' => array(
                         'GETvar' => 'tx_t3blog_pi1[blogList][datefrom]',
                     )
                 ),
                 'tags' => array (
                     'from' => array(
                         'GETvar' => 'tx_t3blog_pi1[blogList][tags]',
                     )
                 ),
                 'author' => array (
                     'from' => array(
                         'GETvar' => 'tx_t3blog_pi1[blogList][author]',
                     )
                 ),
                 'tstmp' => array (
                     'from' => array(
                         'GETvar' => 'tx_t3blog_pi1[tstmp]',
                     )
                 ),
                 'blog-to' => array (
                     to => array(
                         'GETvar' => 'tx_t3blog_pi1[blogList][dateto]',
                     )
                 ),
                 'rssType' => array (
                     to => array(
                         'GETvar' => 'tx_t3blog_pi1[rss][feed_id]',
                     )
                 ),
                 'rssContent' => array (
                     to => array(
                         'GETvar' => 'tx_t3blog_pi1[rss][value]',
                     )
                 ),
                 'trackback' => array (
                     array(
                         'GETvar' => 'tx_t3blog_pi1[trackback]',
                     ),
                 ),
                 'insert' => array (
                     array(
                         'GETvar' => 'tx_t3blog_pi1[blogList][insert]',
                         'valueMap' => array (				
                             'no' => '0',
                             'comment' => '1',
                         ),
                     ),
                 ),
                 'editComment' => array (
                     'from' => array(
                         'GETvar' => 
'tx_t3blog_pi1[blogList][editCommentUid]',
                     ),
                 ),
                 'into' => array (
                     array(
                         'GETvar' => 'tx_t3blog_pi1[blogList][uid]',
                     ),
                 ),
             ),
         ),
         'fileName' => array (
//
// if you don't want .html-URLs set the following to "false" (e.g. 
'defaultToHTMLsuffixOnPrev' => false,)
// then you get http://www.yourdomain.com/imprint/ instead of 
http://www.yourdomain.com/imprint.html
//
             'defaultToHTMLsuffixOnPrev' => true,
             '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',
                     ),
                 ),
             ),
         ),
     ),
);

$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['realurl']['new.johannesdoerr.de']=$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['realurl']['_DEFAULT']; 

$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['realurl']['new.johannesdoerr.de']['pagePath']['rootpage_id'] 
= '1';

$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['realurl']['new.mindrobots.de']=$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['realurl']['_DEFAULT']; 

$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['realurl']['new.mindrobots.de']['pagePath']['rootpage_id'] 
= '5';

$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['realurl']['new.physics.johannesdoerr.de']=$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['realurl']['_DEFAULT']; 

$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['realurl']['new.physics.johannesdoerr.de']['pagePath']['rootpage_id'] 
= '25';

$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['realurl']['keys.johannesdoerr.de']=$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['realurl']['_DEFAULT']; 

$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['realurl']['keys.johannesdoerr.de']['pagePath']['rootpage_id'] 
= '13';

?>


Viele Grüße,
Johannes


More information about the TYPO3-german mailing list