Search TYPO3-索引搜索生成错误的URL';结果如何

Search TYPO3-索引搜索生成错误的URL';结果如何,search,typo3,typo3-6.2.x,tx-news,tx-indexed-search,Search,Typo3,Typo3 6.2.x,Tx News,Tx Indexed Search,我在前端使用索引搜索,因此用户可以在我的页面上搜索,例如搜索新闻 但是搜索结果中的URL是错误的 例如 预期URL: http://my-page.com/de/neuigkeiten/produktneuheiten/detail/neue-nachricht.html 结果URL: http://my-page.com/de/neuigkeiten/produktneuheiten/detail/detail/News/neue-nachricht.html 您可以从结果URL中看到,/de

我在前端使用索引搜索,因此用户可以在我的页面上搜索,例如搜索新闻

但是搜索结果中的URL是错误的

例如

预期URL:

http://my-page.com/de/neuigkeiten/produktneuheiten/detail/neue-nachricht.html

结果URL:

http://my-page.com/de/neuigkeiten/produktneuheiten/detail/detail/News/neue-nachricht.html

您可以从结果URL中看到,
/detail/News
被呈现到URL中

页面的结构如下所示:

问题:

  • 为什么
    /detail/News
    出现在URL中
  • 我怎样才能修好它
如果你需要我提供任何信息,请告诉我


typo3conf/realurl\u conf.php

<?php

$GLOBALS['TYPO3_CONF_VARS']['FE']['addRootLineFields'] .= ',tx_realurl_pathsegment';

$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['realurl'] = array (
    '_DEFAULT' => array (
        'init' => array (
            'enableCHashCache' => '1',
            'appendMissingSlash' => 'ifNotFile,redirect',
            'enableUrlDecodeCache' => '1',
            'enableUrlEncodeCache' => '1',
            'emptyUrlReturnValue' => '/',
            'postVarSet_failureMode' => ''
            //'postVarSet_failureMode' => 'redirect_goodUpperDir'
        ),
        'redirects' => array(
            'de.html'=>'de/',
            'en.html'=>'en/',
            'fr.html'=>'fr/',
            'es.html'=>'es/',
        ),
        'preVars' => array (
            array (
                'GETvar' => 'no_cache',
                'valueMap' => array (
                    'nc' => '1',
                ),
                'noMatch' => 'bypass'
            ),
            array(
                'GETvar' => 'L',
                'valueMap' => array(
                    'de' => '0',
                    'en' => '1',
                    'fr' => '2',
                    'es' => '3',
                ),
                'valueDefault' => 'de',
            ),
            array (
                'GETvar' => 'lang',
                'valueMap' => array (
                    'de' => 'de',
                    'en' => 'en',
                    'fr' => 'fr',
                ),
                'noMatch' => 'bypass',
            ),
        ),
        'pagePath' => array (
            'type' => 'user',
            'userFunc' => 'EXT:realurl/class.tx_realurl_advanced.php:&tx_realurl_advanced->main',
            'spaceCharacter' => '-',
            'languageGetVar' => 'L',
            'expireDays' => '7',
            'firstHitPathCache' => 1,
            'rootpage_id' => '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' => '-'
                        )
                    )
                )
            ),
            '154' => 'newsDetailConfiguration', // For additional detail pages, add their uid as well
            '155' => 'newsDetailConfiguration',
            '156' => 'newsDetailConfiguration',
            '157' => 'newsDetailConfiguration',
            '399' => 'newsDetailConfiguration',
            '71' => 'newsTagConfiguration',
            '72' => 'newsCategoryConfiguration',
        ),
        'postVarSets' => array (
            '_DEFAULT' => array(
                'productfinder' => array(
                    array(
                        'GETvar' => 'tx_mbclpdb_mbclproductfinder[controller]',
                        'noMatch' => 'bypass'
                    )
                ),
                'filelist' => array(
                    array(
                        'GETvar' => 'tx_mbdownloads_mbfilelist[controller]',
                        'GETvar' => 'tx_mbdownloads_mbfilelistmarginal[controller]',

                    ),
                    array(
                        'GETvar' => 'tx_mbdownloads_mbfilelist[action]',
                        'GETvar' => 'tx_mbdownloads_mbfilelistmarginal[action]',
                        'noMatch' => 'bypass'
                    ),

                ),
                '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 (
//
// 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 (
                'sitemap.xml' => array (
                    'keyValues' => array(
                        'type' => 776,
                    )
                ),
                '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',
                    ),
                ),
                'news.rss' => array (
                    'keyValues' => array (
                        'type' => '9818',
                    ),
                ),
                'products.rss' => array (
                    'keyValues' => array (
                        'type' => '9819',
                    ),
                ),
                'events.rss' => array (
                    'keyValues' => array (
                        'type' => '9820',
                    ),
                ),
                'workshops.rss' => array (
                    'keyValues' => array (
                        'type' => '9821',
                    ),
                ),
                'news.json' => array (
                    'keyValues' => array (
                        'type' => '9898',
                    ),
                ),
            ),
        ),
    ),
);
?>

我可以通过从文件
typo3conf/realurl\u conf.php
中删除这两个数组来解决这个问题:

            array(
                'GETvar' => 'tx_news_pi1[action]',
                'valueMap' => array(
                    'detail' => '',
                ),
                'noMatch' => 'bypass'
            ),
            array(
                'GETvar' => 'tx_news_pi1[controller]',
                'valueMap' => array(
                    'News' => '',
                ),
                'noMatch' => 'bypass'
            ),

我可以通过从文件
typo3conf/realurl\u conf.php
中删除这两个数组来解决这个问题:

            array(
                'GETvar' => 'tx_news_pi1[action]',
                'valueMap' => array(
                    'detail' => '',
                ),
                'noMatch' => 'bypass'
            ),
            array(
                'GETvar' => 'tx_news_pi1[controller]',
                'valueMap' => array(
                    'News' => '',
                ),
                'noMatch' => 'bypass'
            ),

您好,您的realURL配置中有错误吗?您可以发布realURL的配置吗?你如何抓取新闻,使用抓取程序扩展还是页面请求?不幸的是,我不知道如何抓取新闻。我认为索引搜索可以做到这一点。如果我第一次打开新闻条目,则新闻将被编入索引。我应该用整个
typo3conf/realurl_conf.php
文件更新我的问题吗?是的,请发布你的real_conf.php。如果你用ID=155重命名页面,链接会发生什么?没问题。下面是一篇缩短realurl的博客文章。您好,您的realURL配置中有错误吗?您可以发布realURL的配置吗?你如何抓取新闻,使用抓取程序扩展还是页面请求?不幸的是,我不知道如何抓取新闻。我认为索引搜索可以做到这一点。如果我第一次打开新闻条目,则新闻将被编入索引。我应该用整个
typo3conf/realurl_conf.php
文件更新我的问题吗?是的,请发布你的real_conf.php。如果你用ID=155重命名页面,链接会发生什么?没问题。下面是一篇缩短realurl的博客文章。