TYPO3 6.1.7 news details urls with parameters get thrown to 404 page

不问归期 提交于 2020-01-17 02:43:05

问题


I have the following problem on a TYPO3 6.1.7 installation: on the news details page, when trying to add some parameters to the url, i get thrown to the 404 page.

So if i have a url of type :

[my_site]/typo3_6.1.7/examples/tt-news/news-details/?tx_ttnews[tt_news]=3&cHash=9011f9244c0a445bc1409ee0ef137d54 and i try to add any parameter after cHash (for example some_param=123), it goes to the 404 page with a 404 redirect code.

We would need this functionality for accessing the news details page with some google analytics params, such as ?utm_source=XXX&utm_medium=YYY&utm_content=news&utm_campaign=ZZZ

The same thing happens when I try to add some params to a news details page that is based on the new tx_news news system :

[my_site]typo3_6.1.5/examples/news/article/typo3-celebrates-20th-anniversary/?utm_source=XXX&utm_medium=YYY&utm_content=news&utm_campaign=ZZZ also goes to the 404 page.

Without adding those params in the url, the news are displayed fine, no redirect happens.

I have tried using the automatic realurl configuration, as well as the one from the examples from the tt_news extension, with equal results: always the 404 page.

I have also tried it on different servers with TYPO3 6.1.7, with php 5.3 or php 5.4 on them.

These would be the symptoms. Anybody any ideas about a cure? Could there be a compatibility issue between TYPO3 6, realurl and the news systems (tt_news & tx_news)?


回答1:


You should exclude your parameter from the chash calculation. Its can be done in the install tool. In the "all configuration" section search for "cHashExcludedParameters". Every variable listed here will be ignored when building the chash for the page. By default you should have your language parameter listed here for example: L

Now all you need to do is to add your parameter to the list. Given that your parameter is namend "utm_campaign", it should look like this: L, utm_campaign

You can add additional parameters as comma seperated list: L, utm_campaign, foo, bar

Make sure to clear you caches after the change.



来源:https://stackoverflow.com/questions/22450764/typo3-6-1-7-news-details-urls-with-parameters-get-thrown-to-404-page

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!