带有typoscript的XML Sitemap会生成错误的网址

问题描述 投票:0回答:1

根据http://www.typo3-probleme.de/2018/07/11/typo3-sitemap-mit-typoscript-erstellen-2285/,我让TYPO3 V8.7.24生成sitemap.xml文件。到目前为止它的作用。但是在文件中没有正确的URL。在每个URL结尾处是“?type = 500001”,例如URL看起来像“https://www.domain.ch/angebot/online-marketing/?type=500001”。另外,还有Ext:Realurl正在使用中。

我的要求是,如何删除段“?type = 500001”?原因是typoscript还是扩展名为Realurl?我该如何分析呢?

任何提示都是受欢迎的。在此先感谢您的帮助。

typo3 sitemap typoscript typo3-8.x
1个回答
0
投票

它是TYPO3内部的链接生成。由typoscript配置,所以你可以看到typoscript作为罪魁祸首。

如果您想知道realurl(或任何其他扩展名)是否是罪魁祸首:请记住禁用扩展名。如果错误消失,则有理由怀疑此扩展。

当TYPO3生成链接时,它会保留一些参数以保留在当前上下文中。应该考虑哪些参数是一种配置(因此它以typoscript为基础)。

看看(TSOB)一般在config.linkVars(它被隐式复制到每个页面对象)或你的页面对象page.config.linkVars(在你的情况下:xml_sitemap.config.linkVars

手册中有一个注释:

Do not include the type parameter in the linkVars list, as this can result in unexpected behavior.

其他选项是明确将&type=0设置为每个链接。但别忘了设置config.uniqueLinkVars = 1(或xml_sitemap.config.uniqueLinkVars = 1

© www.soinside.com 2019 - 2024. All rights reserved.