Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configuration troubles #49

Closed
in-session opened this issue Mar 5, 2016 · 5 comments
Closed

Configuration troubles #49

in-session opened this issue Mar 5, 2016 · 5 comments

Comments

@in-session
Copy link

Hi,
I try for several hours to set up the extension with typo3 7.6.4 and realurl 2.0.3.
As info, under realurl with version 1 everything runs perfect.
I have the version 1. uninstalled on the test installation first. And Compare current database with specification and clear all caches inside the install tool. Afterthem I installed the version 2.0.3.
Rootpage is set to id 1 and the domain is inside the list of the root page.

Now I get the follow error:
Core: Exception handler (WEB): Uncaught TYPO3 Exception: #1453732574: RealURL was not able to find the root page id for the domain "UrlOfTheWebsite" | Exception thrown in file /home/www/html/typo3/typo3conf/ext/realurl/Classes/EncodeDecoderBase.php in line 208. Requested URL: UrlOfTheWebsite

Here is my realurl_conf.php

<?php
$TYPO3_CONF_VARS['FE']['addRootLineFields'].= ',tx_realurl_pathsegment';
$TYPO3_CONF_VARS['EXTCONF']['realurl'] = array(
    '_DEFAULT' => array(
        'init' => array(
            'enableCHashCache' => 1,
            'enableCHashCache' => 1,
            'respectSimulateStaticURLs' => 0,
            'appendMissingSlash' => 'ifNotFile',
            'enableUrlDecodeCache' => 1,
            'enableUrlEncodeCache' => 1,
            'postVarSet_failureMode' => '',
        ),
        'redirects' => array(),
        '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',
                ),
            ),
            '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
            ),

        'fixedPostVars' => array(
                '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,
                                )
                        )
                ),
                'newsCategoryConfiguration' => array(
                        array(
                                'GETvar' => 'tx_news_pi1[overwriteDemand][categories]',
                                'lookUpTable' => array(
                                        'table' => 'sys_category',
                                        'id_field' => 'uid',
                                        'alias_field' => 'title',
                                        'addWhereClause' => ' AND NOT deleted',
                                        'useUniqueCache' => 1,
                                        'useUniqueCache_conf' => array(
                                                'strtolower' => 1,
                                                'spaceCharacter' => '-'
                                        )
                                )
                        )
                ),
                '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' => '-'
                                        )
                                )
                        )
                ),
                '31' => 'newsDetailConfiguration',
                '71' => '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'
                                )
                        ),

                        'dateFilter' => array(
                                array(
                                        'GETvar' => 'tx_news_pi1[overwriteDemand][year]',
                                ),
                                array(
                                        'GETvar' => 'tx_news_pi1[overwriteDemand][month]',
                                ),
                        ),
                        'page' => array(
                                array(
                                        'GETvar' => 'tx_news_pi1[@widget_0][currentPage]',
                                ),
                        ),
                ),
        ),
        'fileName' => array(
            'defaultToHTMLsuffixOnPrev' => 1,
            'index' => array(
                'sitemap.xml' => array(
                    'keyValues' => array(
                        'type' => 776,
                    ),
                ),
                'rss.xml' => array(
                'keyValues' => array(
                    'type' => 9818,
                    ),
                ),
                'news.xml' => array(
                'keyValues' => array(
                    'type' => 1426844832,
                    ),
                ),
            ),
        ),
    ),
);
?>

Cheers

@dmitryd
Copy link
Owner

dmitryd commented Mar 5, 2016

The first line of your configuration is not needed since... may be 5 years ago :) Remove that addRootLineFields thing.

For the rest, please, temporary remove your config and try automatic configuration. Your config contains a lot of settings that do not exist or should not be set even for version 1.x (like firstHitPathCache).

Please, make sure that your pages either have domains records, or 'Is site root?' is set in page properties.

@dmitryd
Copy link
Owner

dmitryd commented Mar 5, 2016

One more thing: change $TYPO3_CONF_VARS to $GLOBALS['TYPO3_CONF_VARS']. Your config is not visible on my system at all because $TYPO3_CONF_VARS would be local to the function that loads it.

@in-session
Copy link
Author

ha ha ha ok removed the fields :-)

With the auto configuration works the test installation, but howto put now the language code inside the url? And also how to change the params like: ?tx_news_pi1[controller]=News&tx_news_pi1[action]=detail&cHash=baa26d725343d587cea1b1e3d4d1477d?

your are my hero :-) your last post was the problem $GLOBALS['TYPO3_CONF_VARS']

Have you a chance to post a minimal realurl_conf.php for everybody, so that it is more comfortable?

Cheers

@dmitryd
Copy link
Owner

dmitryd commented Mar 5, 2016

Minimal realurl config is no config 😄 Automatic configuration is minimal config.

Language codes will work with automatic configuration if you install static_info_tables extension and set language codes in the language records (static_info_tables provides a selector in the language record). Configuration for tx_news is provided by EXT:news automatically too. There is a special interface for extensions to pre-configure realurl.

@in-session
Copy link
Author

:-D you are right, but for me works fine with realurl_conf.php it is a little bit easyer for handling and adjust small parts like the filesnames etc. Thanks for your help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants