Zum Inhalt springen

Realurl 2.0.x und News

Erstellt am 17. März 2016 · 5 Antworten · letzte Antwort am 19. November 2016

Tags: RealURL, URLs & Routing, Frage

martinibianco007 ·

Hi,
seit dem RealURL Update ab 2.0.x scheint die Konfiguration nicht mehr zu funktionieren.
Es scheint so als würde basic.configFile der hinterglegte Pfad fileadmin/templates/realurl/config.php
nicht greifen.

Hat sonst noch wer dieses Problem?

Oder muss man die Konfiguration nun ändern?
Bisher:

<?php
$TYPO3_CONF_VARS['EXTCONF']['realurl']['_DEFAULT'] = array(
	
	'pagePath' => array(
        'type' => 'user',
        'userFunc' => 'EXT:realurl/class.tx_realurl_advanced.php:&tx_realurl_advanced->main',
        'spaceCharacter' => '-',
        'languageGetVar' => 'L',
        'expireDays' => 3,
        'rootpage_id' => 1,
        'firstHitPathCache'=>1
    ),
	
    'init' => array(
        'enableCHashCache' => TRUE,
        'enableCHashCache' => 1,
        'appendMissingSlash' => 'ifNotFile',
        'enableUrlDecodeCache' => 1,
        'enableUrlEncodeCache' => 1,
    ),
    
    'redirects_regex' => array(),
    'preVars' => array(
        array(
            'GETvar' => 'no_cache',
            'valueMap' => array(
                'no_cache' => 1
            ),
            'noMatch' => 'bypass'
        ),
        array(
            'GETvar' => 'L',
            'valueMap' => array(
                'de' => '0'
            ),
            'noMatch' => 'bypass'
        )
    ),
    
    'fixedPostVars' => array(
        'newsDetailConfiguration' => array(
	         array(
	                'GETvar' => 'tx_news_pi1[news]',
	                'lookUpTable' => array(
	                        'table' => 'tx_news_domain_model_news',
	                        'id_field' => 'uid',
	                        'alias_field' => 'title',
	                        'addWhereClause' => ' AND NOT deleted',
	                        'useUniqueCache' => 1,
	                        'useUniqueCache_conf' => array(
	                                'strtolower' => 1,
	                                'spaceCharacter' => '-'
	                        ),
	                        'languageGetVar' => 'L',
	                        'languageExceptionUids' => '',
	                        'languageField' => 'sys_language_uid',
	                        'transOrigPointerField' => 'l10n_parent',
	                        'autoUpdate' => 1,
	                        'expireDays' => 180,
	                )
                )
        ),
        
        'newsCategoryConfiguration' => array(
            array(
                    'GETvar' => 'tx_news_pi1[overwriteDemand][categories]',
                    'lookUpTable' => array(
                            'table' => 'tx_news_domain_model_category',
                            'id_field' => 'uid',
                            'alias_field' => 'title',
                            'addWhereClause' => ' AND NOT deleted',
                            'useUniqueCache' => 1,
                            'useUniqueCache_conf' => array(
                                    'strtolower' => 1,
                                    'spaceCharacter' => '-'
                            )
                    )
            )
        ),
       
       // For additional detail pages, add their uid as well
        '18' => 'newsDetailConfiguration',
        //'16' => 'newsDetailConfiguration', 
        //'19' => 'newsTagConfiguration',
       //'72' => 'newsCategoryConfiguration',
        
        
    ),
    'postVarSets' => array(
        '_DEFAULT' => array(
	        'controller' => array(
                    array(
                            'GETvar' => 'tx_news_pi1[action]',
                            'noMatch' => 'bypass'
                    ),
                    array(
                            'GETvar' => 'tx_news_pi1[controller]',
                            'noMatch' => 'bypass'
                    )
            ),
	        	        
	        // pagebrowser news
	        'seite' => array(
                    array(
                            'GETvar' => 'tx_news_pi1[@widget_0][currentPage]',
                    ),
            ),
	        
	    )
    ),
    // configure filenames for different pagetypes
    'fileName' => array(
        'defaultToHTMLsuffixOnPrev' => 0,
        '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'
                )
            ),
            'sitemap.xml' => array(
                'keyValues' => array(
                    'type' => '776'
                )
            ),
            'robots.txt' => array(
                'keyValues' => array(
                    'type' => '201'
                )
            )
        )
        
    )
);

?>
Zwirni ·

Hi,

mir geht es gerade ähnlich. Sobald ich jedoch absichtlich mal einen SQL-Fehler in die Konfiguration eingebe, dann merkt er es - die Datei wird in jedem Fall gelesen. Sobald ich den Fehler rausnehme ist auch die betreffende Seite da, was vorher nicht der Fall war.

Wenn jemand dazu eine Idee hat wäre es prima 🙂

Typolisten ·
<?php
$TYPO3_CONF_VARS['EXTCONF']['realurl']['_DEFAULT'] = array(
...

zu

<?php
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['realurl'] = array(

sollte helfen!

sunlite ·

Hi,

habe das gleiche Problem. Die $GLOBALS-Änderung hilft bei mir gar nichts. Seit dem TYPO3-Upgrade von 7.6.4 auf 7.6.9 und den Updates von RealURL 1.13.x auf 2.0.14 und tx_news 4.0.1 auf 4.2.1 wird bei mir die URL einfach nicht mehr richtig dargestellt - zumindest nicht bei den NEWS. Bin auch langsam müde, tagelang nach Lösungen zu suchen, die dann nicht funktionieren. Und funktionieren sie endlich, gibts das nächste Typo3-Update und der Mist geht von vorne los.
Na gut. Genug gejammert. Hier mal meine realurl_conf.php. Vielleicht findet ja jemand den Fehler. Dankbar wäre ich auf jeden Fall.

Saludos

  <?php

$TYPO3_CONF_VARS['FE']['addRootLineFields'].= ',title,alias';
$TYPO3_CONF_VARS['EXTCONF']['realurl'] = 
array( 
    '_DEFAULT' => array(
        'init' => array(
            'enableCHashCache' => 1,
            'appendMissingSlash' => 'ifNotFile',
            'enableUrlDecodeCache' => 1,
            'enableUrlEncodeCache' => 1,
			'appendMissingSlash' => 'ifNotFile,redirect',
			'postVarSet_failureMode' => 'redirect_goodUpperDir',
			'enableAllUnicodeLetters' => 0,
			'doNotRawUrlEncodeParameterNames' => 1,
        ),
        'redirects' => array(),
        'preVars' => array(
           
            array(
                'GETvar' => 'L',
                'valueMap' => array(
                    'en' => '2',
                    'de' => '1',
                ),
                'noMatch' => 'bypass',
				'defaultValue' => 'de',
            ),
        ),
        'pagePath' => array(
            'type' => 'user',
            'userFunc' => 'EXT:realurl/class.tx_realurl_advanced.php:&tx_realurl_advanced->main',
            'spaceCharacter' => '-',
            'languageGetVar' => 'L',
            'expireDays' => 3,
			'firstHitPathCache'=>1,
			'disablePathCache' => FALSE,
			'autoUpdatePathCache' => TRUE,
			'firstHitPathCache' => TRUE,
            'rootpage_id' => 1
        ),
        'fileName' => array (
            'defaultToHTMLsuffixOnPrev'=> 1
        ),
        'fixedPostVars' => array(
		// news detail configuration
					'newsDetailConfiguration' => array(
                        array(
                                'GETvar' => 'tx_news_pi1[action]',
                                'valueMap' => array(
                                        'detail' => '',
                                ),
                                'noMatch' => 'bypass'
                        ),
                        array(
                                'GETvar' => 'tx_news_pi1[controller]',
                                'valueMap' => array(
                                        'News' => '',
                                ),
                                'noMatch' => 'bypass'
                        ),
                        array(
                                'GETvar' => 'tx_news_pi1[news]',
                                'lookUpTable' => array(
                                        'table' => 'tx_news_domain_model_news',
                                        'id_field' => 'uid',
                                        'alias_field' => 'title',
                                        'addWhereClause' => ' AND NOT deleted',
                                        'useUniqueCache' => 1,
                                        'useUniqueCache_conf' => array(
                                                'strtolower' => 1,
                                                'spaceCharacter' => '-'
                                        ),
                                        'languageGetVar' => 'L',
                                        'languageExceptionUids' => '',
                                        'languageField' => 'sys_language_uid',
                                        'transOrigPointerField' => 'l10n_parent',
                                        'autoUpdate' => 1,
                                        'expireDays' => 180,
                                )
                        )
                ),
				
				'newsTagConfiguration' => array(
                        array(
                                'GETvar' => 'tx_news_pi1[overwriteDemand][tags]',
                                'lookUpTable' => array(
                                        'table' => 'tx_news_domain_model_tag',
                                        'id_field' => 'uid',
                                        'alias_field' => 'title',
                                        'addWhereClause' => ' AND NOT deleted',
                                        'useUniqueCache' => 1,
                                        'useUniqueCache_conf' => array(
                                                'strtolower' => 1,
                                                'spaceCharacter' => '-'
                                        )
                                )
                        )
                ),
		'27' => 'newsDetailConfiguration',
		'55' => 'newsDetailConfiguration', // For additional detail pages, add their uid as well
		),
		 
		
        'postVarSets' => array(
            '_DEFAULT' => array(
                // news archive parameters
                'archive' => array(
                    array(
                        'GETvar' => 'tx_news_pi1[year]' ,
                        ),
                    array(
                        'GETvar' => 'tx_news_pi1[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_news_pi1[pointer]',
                        ),
                    ),
                // news categories
                'select_category' => array (
                    array(
                        'GETvar' => 'tx_news_pi1[cat]',
                        ),
                    ),
					
				
        
					
					
					
					
                // news articles and searchwords
                'article' => array(
                    array(
                        'GETvar' => 'tx_news_pi1[tt_news]',
                        'lookUpTable' => array(
                            'table' => 'tx_news_domain_model_news',
                            'id_field' => 'uid',
                            'alias_field' => 'title',
                            'addWhereClause' => ' AND NOT deleted',
                            'useUniqueCache' => 1,
                            'useUniqueCache_conf' => array(
                                'strtolower' => 1,
                                'spaceCharacter' => '-',
                                ),
                            ),
                        ),
                    array(
                        'GETvar' => 'tx_news_pi1[backPid]',
                    ),
                    array(
                        'GETvar' => 'tx_news_pi1[swords]',
                        ),
                    ),
                ),
            ),
    ),
);
?>

Als .htaccess verwende ich übrigens die von Typo3 mitgelieferte. Kann der Fehler vielleicht daran liegen?

Typolisten ·

Hallo,

Die $GLOBALS-Änderung hilft bei mir gar nichts.

... bei mir schon, möchte auf diese Antwort aber auch nicht weiter eingehen!

Ohne tiefer greifende Informationen ist Hilfe immer recht schwierig!

Versionen:
realurl 2.0.4
news 4.1.0

realurl-Konfiguration (TYPO3-Backend):

Bild: typolisten.de/reaurl_conf.jpg

realurl_conf.php (im typo3conf-Verzeichnis):

<?php
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['realurl'] = array(
	'_DEFAULT' => array(
		'init' => array(
			'enableCHashCache' => 1,
			'appendMissingSlash' => 'ifNotFile,redirect',
			'enableUrlDecodeCache' => 1,
			'enableUrlEncodeCache' => 1,
			'postVarSet_failureMode' => '',
			'languageExceptionUids' => '0',
			'enableAllUnicodeLetters' => 1,
		),
		'redirects' => array(),
/* preVars sind Parameter, die an die URL angehängt werden z.B. L für die Sprachauswahl. Durch 
die folgende Konfiguration werden diese nicht mehr angehangen, sondern in die URL eingebettet */
		'preVars' => array(
			array(
				'GETvar' => 'no_cache',
				'valueMap' => array(
					'nc' => 1,
				),
				'noMatch' => 'bypass',
			),
			array(
				'GETvar' => 'L',
				'valueMap' => array(
					// 'de' => 0,
					'en' => 1,
				),
				'valueDefault' => 'de',
				'noMatch' => 'bypass',
			),
			array(
				'GETvar' => 'type',
				'valueMap' => array(
					'print' => 98,
				),
				'noMatch' => 'bypass',
			),
		),
...

Viele Grüße
Typolisten

dirk_juettner ·

Hallo Sunlite

Eines ist sicherlich falsch an Deiner Konfiguration:
ZEILE 152 ist FALSCH
'GETvar' => 'tx_news_pi1[tt_news]',
RICHTIG ist
'GETvar' => 'tx_news_pi1[news]',

Grüße
Dirk Jüttner

sunlite schrieb

Hi,

habe das gleiche Problem. Die $GLOBALS-Änderung hilft bei mir gar nichts. Seit dem TYPO3-Upgrade von 7.6.4 auf 7.6.9 und den Updates von RealURL 1.13.x auf 2.0.14 und tx_news 4.0.1 auf 4.2.1 wird bei mir die URL einfach nicht mehr richtig dargestellt - zumindest nicht bei den NEWS. Bin auch langsam müde, tagelang nach Lösungen zu suchen, die dann nicht funktionieren. Und funktionieren sie endlich, gibts das nächste Typo3-Update und der Mist geht von vorne los.
Na gut. Genug gejammert. Hier mal meine realurl_conf.php. Vielleicht findet ja jemand den Fehler. Dankbar wäre ich auf jeden Fall.

Saludos

  <?php

$TYPO3_CONF_VARS['FE']['addRootLineFields'].= ',title,alias';
$TYPO3_CONF_VARS['EXTCONF']['realurl'] = 
array( 
    '_DEFAULT' => array(
        'init' => array(
            'enableCHashCache' => 1,
            'appendMissingSlash' => 'ifNotFile',
            'enableUrlDecodeCache' => 1,
            'enableUrlEncodeCache' => 1,
			'appendMissingSlash' => 'ifNotFile,redirect',
			'postVarSet_failureMode' => 'redirect_goodUpperDir',
			'enableAllUnicodeLetters' => 0,
			'doNotRawUrlEncodeParameterNames' => 1,
        ),
        'redirects' => array(),
        'preVars' => array(
           
            array(
                'GETvar' => 'L',
                'valueMap' => array(
                    'en' => '2',
                    'de' => '1',
                ),
                'noMatch' => 'bypass',
				'defaultValue' => 'de',
            ),
        ),
        'pagePath' => array(
            'type' => 'user',
            'userFunc' => 'EXT:realurl/class.tx_realurl_advanced.php:&tx_realurl_advanced->main',
            'spaceCharacter' => '-',
            'languageGetVar' => 'L',
            'expireDays' => 3,
			'firstHitPathCache'=>1,
			'disablePathCache' => FALSE,
			'autoUpdatePathCache' => TRUE,
			'firstHitPathCache' => TRUE,
            'rootpage_id' => 1
        ),
        'fileName' => array (
            'defaultToHTMLsuffixOnPrev'=> 1
        ),
        'fixedPostVars' => array(
		// news detail configuration
					'newsDetailConfiguration' => array(
                        array(
                                'GETvar' => 'tx_news_pi1[action]',
                                'valueMap' => array(
                                        'detail' => '',
                                ),
                                'noMatch' => 'bypass'
                        ),
                        array(
                                'GETvar' => 'tx_news_pi1[controller]',
                                'valueMap' => array(
                                        'News' => '',
                                ),
                                'noMatch' => 'bypass'
                        ),
                        array(
                                'GETvar' => 'tx_news_pi1[news]',
                                'lookUpTable' => array(
                                        'table' => 'tx_news_domain_model_news',
                                        'id_field' => 'uid',
                                        'alias_field' => 'title',
                                        'addWhereClause' => ' AND NOT deleted',
                                        'useUniqueCache' => 1,
                                        'useUniqueCache_conf' => array(
                                                'strtolower' => 1,
                                                'spaceCharacter' => '-'
                                        ),
                                        'languageGetVar' => 'L',
                                        'languageExceptionUids' => '',
                                        'languageField' => 'sys_language_uid',
                                        'transOrigPointerField' => 'l10n_parent',
                                        'autoUpdate' => 1,
                                        'expireDays' => 180,
                                )
                        )
                ),
				
				'newsTagConfiguration' => array(
                        array(
                                'GETvar' => 'tx_news_pi1[overwriteDemand][tags]',
                                'lookUpTable' => array(
                                        'table' => 'tx_news_domain_model_tag',
                                        'id_field' => 'uid',
                                        'alias_field' => 'title',
                                        'addWhereClause' => ' AND NOT deleted',
                                        'useUniqueCache' => 1,
                                        'useUniqueCache_conf' => array(
                                                'strtolower' => 1,
                                                'spaceCharacter' => '-'
                                        )
                                )
                        )
                ),
		'27' => 'newsDetailConfiguration',
		'55' => 'newsDetailConfiguration', // For additional detail pages, add their uid as well
		),
		 
		
        'postVarSets' => array(
            '_DEFAULT' => array(
                // news archive parameters
                'archive' => array(
                    array(
                        'GETvar' => 'tx_news_pi1[year]' ,
                        ),
                    array(
                        'GETvar' => 'tx_news_pi1[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_news_pi1[pointer]',
                        ),
                    ),
                // news categories
                'select_category' => array (
                    array(
                        'GETvar' => 'tx_news_pi1[cat]',
                        ),
                    ),
					
				
        
					
					
					
					
                // news articles and searchwords
                'article' => array(
                    array(
                        'GETvar' => 'tx_news_pi1[tt_news]',
                        'lookUpTable' => array(
                            'table' => 'tx_news_domain_model_news',
                            'id_field' => 'uid',
                            'alias_field' => 'title',
                            'addWhereClause' => ' AND NOT deleted',
                            'useUniqueCache' => 1,
                            'useUniqueCache_conf' => array(
                                'strtolower' => 1,
                                'spaceCharacter' => '-',
                                ),
                            ),
                        ),
                    array(
                        'GETvar' => 'tx_news_pi1[backPid]',
                    ),
                    array(
                        'GETvar' => 'tx_news_pi1[swords]',
                        ),
                    ),
                ),
            ),
    ),
);
?>

Als .htaccess verwende ich übrigens die von Typo3 mitgelieferte. Kann der Fehler vielleicht daran liegen?