TYPO3 indexed_search realurl

时间:2018-07-03 18:35:57

标签: typo3 typo3-8.x realurl tx-indexed-search

我正在使用TYPO3 8.7LTS。

我工作了indexed_search,但是我发现搜索结果后面的URL并未像/pagewithfoundkeyword/那样显示“干净的URL”,而是将结果URL显示为index.php?id=x

对于普通页面,realurl可以正常工作,只是它在&tx_indexedsearch_pi2[action]=search&tx_indexedsearch_pi2[controller]=Search页面后面仍然显示/search

如何获得用于indexed_search结果URL的realurl?

编辑:每个搜索结果URL中都有queryparam &L=404(也许404多语言错误页面扩展名由于某些原因而冲突)?

realurl_conf:

$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['realurl_404_multilingual'] = [
    '_DEFAULT' => [
    'errorPage' => '404',
    'unauthorizedPage' => 'login',
    ],
];


$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['realurl']['encodeSpURL_postProc']['url_beautifier_encode'] = 'WapplerSystems\WsT3bootstrap\Hooks\Realurl\SpeakingUrlModifyHook->encodeMapping';
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['realurl']['decodeSpURL_preProc']['url_beautifier_decode'] = 'WapplerSystems\WsT3bootstrap\Hooks\Realurl\SpeakingUrlModifyHook->decodeMapping';



$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['realurl']['_DEFAULT'] = [
    'init' => [
#'postVarSet_failureMode' => '',
    'appendMissingSlash' => 'ifNotFile'
    ],
    'preVars' => [

    [ 
    'GETvar' => 'L',
    'valueMap' => [],
    ],
    ],
    'pagePath' => [
    'rootpage_id' => 1,
    ],
    'fileName' => [
    'defaultToHTMLsuffixOnPrev' => 0,
    'index' => [
        'rss.xml' => [
            'keyValues' => [
                'type' => 9818,
            ],
        ],
        'mail.html' => [
            'keyValues' => [
                'type' => 23423499,
            ],
        ],
        'amp.html' => [
            'keyValues' => [
                'type' => 786575,
            ],
        ]
    ],
    ],
    'fixedPostVars' => [

    /* News start */
    'newsDetailConfiguration' => [
        [
            'GETvar' => 'tx_news_pi1[action]',
            'noMatch' => 'bypass',
        ],
        [
            'GETvar' => 'tx_news_pi1[controller]',
            'noMatch' => 'bypass',
        ],
        [
            'GETvar' => 'tx_news_pi1[news]',
            'lookUpTable' => [
                'table' => 'tx_news_domain_model_news',
                'id_field' => 'uid',
                'alias_field' => 'title',
                'addWhereClause' => ' AND NOT deleted',
                'useUniqueCache' => 1,
                'useUniqueCache_conf' => [
                    'strtolower' => 1,
                    'spaceCharacter' => '-'
                ],
                'languageGetVar' => 'L',
                'languageExceptionUids' => '',
                'languageField' => 'sys_language_uid',
                'transOrigPointerField' => 'l10n_parent',
                'autoUpdate' => 1,
                'expireDays' => 180,
            ]
        ]
    ],
    'newsCategoryConfiguration' => [
        [
            'GETvar' => 'tx_news_pi1[overwriteDemand][categories]',
            'lookUpTable' => [
                'table' => 'sys_category',
                'id_field' => 'uid',
                'alias_field' => 'title',
                'addWhereClause' => ' AND NOT deleted',
                'useUniqueCache' => 1,
                'useUniqueCache_conf' => [
                    'strtolower' => 1,
                    'spaceCharacter' => '-'
                ]
            ]
        ]
    ],
    'newsTagConfiguration' => [
        [
            'GETvar' => 'tx_news_pi1[overwriteDemand][tags]',
            'lookUpTable' => [
                'table' => 'tx_news_domain_model_tag',
                'id_field' => 'uid',
                'alias_field' => 'title',
                'addWhereClause' => ' AND NOT deleted',
                'useUniqueCache' => 1,
                'useUniqueCache_conf' => [
                    'strtolower' => 1,
                    'spaceCharacter' => '-'
                ]
            ]
        ]
    ],
    '123' => 'newsDetailConfiguration',
    #'701' => 'newsDetailConfiguration', // For additional detail pages, add their uid as well
    #'71' => 'newsTagConfiguration',
    #'72' => 'newsCategoryConfiguration',

    /* News end */


    /* Address begin */
    'addressDetailConfiguration' => [
        [
            'GETvar' => 'tx_address_pi1[controller]',
            'noMatch' => 'bypass',
        ],
        [
            'GETvar' => 'tx_address_pi1[address]',
            'lookUpTable' => [
                'table' => 'tx_address_domain_model_address',
                'id_field' => 'uid',
                'alias_field' => 'uid',
                'addWhereClause' => ' AND NOT deleted',
                'useUniqueCache' => 1,
                'useUniqueCache_conf' => [
                    'strtolower' => 1,
                    'spaceCharacter' => '-'
                ],
                'languageGetVar' => 'L',
                'languageExceptionUids' => '',
                'languageField' => 'sys_language_uid',
                'transOrigPointerField' => 'l10n_parent',
                'autoUpdate' => 1,
                'expireDays' => 180,
            ]
        ],
        [
            'GETvar' => 'tx_address_pi1[action]',
            'noMatch' => 'bypass',
        ],
    ],
    '175' => 'addressDetailConfiguration',

    /* Address end */


    // events2
    'eventDetailConfiguration' => [ // darf nicht wie die seite heißen
        [
            'GETvar' => 'tx_events2_events[controller]',
            'noMatch' => 'bypass',
        ],
        [
            'GETvar' => 'tx_events2_events[action]',
            'noMatch' => 'bypass',
        ],
        [
            'GETvar' => 'tx_events2_events[event]',
        ],
        [
            'GETvar' => 'tx_events2_events[day]',
        ],
    ],
    '86' => 'eventDetailConfiguration',


    'locationDetailConfiguration' => [ // darf nicht wie die seite heißen
        [
            'GETvar' => 'tx_events2_events[controller]',
        ],
        [
            'GETvar' => 'tx_events2_events[action]',
        ],
        [
            'GETvar' => 'tx_events2_events[location]',
        ],

    ],
    '97' => 'locationDetailConfiguration',


    'glossaryDetailConfiguration' => [
        [
            'GETvar' => 'tx_dpnglossary_glossarydetail[controller]',
            'noMatch' => 'bypass',
        ],
        [
            'GETvar' => 'tx_dpnglossary_glossarydetail[action]',
            'noMatch' => 'bypass',
        ],
        [
            'GETvar' => 'tx_dpnglossary_glossarydetail[pageUid]',
        ],
        [
            'GETvar' => 'tx_dpnglossary_glossarydetail[term]',
            'lookUpTable' => [
                'table' => 'tx_dpnglossary_domain_model_term',
                'id_field' => 'uid',
                'alias_field' => 'name',
                'addWhereClause' => ' AND NOT deleted',
                'useUniqueCache' => 1,
                'useUniqueCache_conf' => [
                    'strtolower' => 1,
                    'spaceCharacter' => '-'
                ],
                'languageGetVar' => 'L',
                'languageExceptionUids' => '',
                'languageField' => 'sys_language_uid',
                'transOrigPointerField' => 'l10n_parent',
                'autoUpdate' => 1,
                'expireDays' => 180,
            ]
        ]
    ],
    '100' => 'glossaryDetailConfiguration',


    'indexedSearch' => [
        [
            'GETvar' => 'tx_indexedsearch_pi2[action]',
            'valueDefault' => 'search',
            //'noMatch' => 'bypass',
        ],
        [
            'GETvar' => 'tx_indexedsearch_pi2[controller]',
            'valueDefault' => 'Search',
            //'noMatch' => 'bypass',
        ],
        /*
        array(
            'GETvar' => 'tx_indexedsearch_pi2[search][sword]',
        ),*/
    ],
    //'11' => 'indexedSearch',

    ],
    'postVarSets' => [
    '_DEFAULT' => [


        'nc' => [
            [
                'GETvar' => 'no_cache',
                'valueMap' => [
                    'nc' => '1',
                ],
            ]
        ],

        /* News start */
        /*
        'controller' => array(
            array(
                'GETvar' => 'tx_news_pi1[action]',
                'noMatch' => 'bypass'
            ),
            array(
                'GETvar' => 'tx_news_pi1[controller]',
                'noMatch' => 'bypass'
            )
        ),*/

        'dateFilter' => [
            [
                'GETvar' => 'tx_news_pi1[overwriteDemand][year]',
            ],
            [
                'GETvar' => 'tx_news_pi1[overwriteDemand][month]',
            ],
        ],
        'seite' => [
            [
                'GETvar' => 'tx_news_pi1[@widget_0][currentPage]',
            ],
        ],
        /* News end */


    ],
    ],
];

0 个答案:

没有答案