Bug #66499
closeddouble site title
Added by Alex Borodinov over 9 years ago. Updated about 7 years ago.
100%
Description
don't know why, but my 6.2.12 site has double title in <title> tag in frontend. For example "My site: My site: Main page", where "My site" is sitename in the main ts template, and "Main page" is the page title of the current page.
Files
setup.txt (9.74 KB) setup.txt | ts setup | Alex Borodinov, 2015-04-21 07:30 | |
pagetitletest.zip (2.25 KB) pagetitletest.zip | Test extension for USER and USER_INT and pageTitle manipulation | Markus Klein, 2015-04-23 23:17 |
Updated by Markus Klein over 9 years ago
- Status changed from New to Needs Feedback
Please provide your TypoScript setup here.
Updated by Alex Borodinov over 9 years ago
Alex Borod wrote:
don't know why, but my 6.2.12 site has double title in <title> tag in frontend. For example "My site: My site: Main page", where "My site"
is sitename in the main ts templateis sitetitle field in web->template template tools, and "Main page" is the page title of the current page.
Updated by Markus Klein over 9 years ago
your TS contains nothing suspicious at first sight. (accept that you maybe should refrain from using baseurl)
I suspect an extension being responsible then. Maybe uninstall all third party extensions and try to activate them one by one, to see which one breaks it.
Generally I strongly recommend to not use the bugtracker for support. Please use the mailing lists/the forum or Slack.
http://typo3.org/teams-committees/core-development/contact/
Updated by Tilo Baller over 9 years ago
Same here since updating to 6.2.12.
Reverting the patch #62080 solves it for me.
Updated by Markus Klein over 9 years ago
Thanks for the info.
Please tell us which extensions you use. I'm very certain this is actually an extension bug, since I invested a fortune of time to get the core straight with page title handling now and I'm very certain as well, that Core is now handling all cases correctly.
Updated by Alex Borodinov over 9 years ago
as for me, this bug comes from felogin and ke_search.
Updated by Markus Klein over 9 years ago
felogin (from Core) for sure does not manipulate the page title!
Updated by Alex Borodinov over 9 years ago
I really don't know about this, but when i just insert felogin on a page as usual CE, the bug appears (and same for ke_search).
Also can confirm, reverting to
$this->setPageRenderer(unserialize($this->config['INTincScript_ext']['pageRenderer']));solves the problem.
Updated by Tilo Baller over 9 years ago
This problem only occurs if the page is only partially cachable, that means when there are _INT objects on the page.
@Alex: I think this is just because felogin an ke_search use an _INT object.
Updated by Markus Klein over 9 years ago
So you mean this happens if more than 1 _INT object is on a single page?
Updated by Tilo Baller over 9 years ago
I mean if there is at least 1 _INT object. This problem does not occur if you have no _INT objects on the page, so that the page is completely cachable.
Updated by Markus Klein over 9 years ago
- Status changed from Needs Feedback to Accepted
- Assignee set to Markus Klein
- Priority changed from -- undefined -- to Must have
- Target version set to next-patchlevel
- Is Regression changed from No to Yes
Args, you're right. I could reproduce this now.
Updated by Markus Klein over 9 years ago
This is the 4th iteration on this topic now since 6.2 or so. OMG, I hate it.
Updated by Markus Klein over 9 years ago
- Sprint Focus set to Stabilization Sprint
Updated by Gerrit Code Review over 9 years ago
- Status changed from Accepted to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/38852
Updated by Gerrit Code Review over 9 years ago
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/38852
Updated by Markus Klein over 9 years ago
Testing instructions for the patch¶
You only need to test partially cached pages. For instance put felogin on a page.
Then test these scenarios, check the page title for correctness, but ensure you're NOT logged into BE:- USER plugin which modifies page title (eg. News)
- USER_INT plugin which modifies page title
- The page without a plugin that modifies the page title
Updated by Markus Klein over 9 years ago
- Target version changed from next-patchlevel to 7.2 (Frontend)
Setting target to 7.2 to let that ticket show up on our stabilization phase sprint board.
Updated by Alex Borodinov over 9 years ago
I've got an error with this patch
PHP Parse error: syntax error, unexpected 'class' (T_CLASS), expecting identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$' in /var/www/data/www/typo3_src-6.2.12/typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php on line 896
Updated by Tilo Baller over 9 years ago
The patch works for me!
@Alex: It seems that something wrent wrong during your patch integration. How did you integrated the patch? Take a look again, especially at lines 896 before/after (which should not be changed after patching, but seem to be according to your error message).
Updated by Alex Borodinov over 9 years ago
@Tilo: Yes, you're right, i made a typo in the code. Now it's working as expected
Updated by Gerrit Code Review over 9 years ago
Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/38852
Updated by Markus Klein over 9 years ago
- File pagetitletest.zip pagetitletest.zip added
Testing information for the latest patch set¶
Use the provided extension and this TypoScript:
# make sure we have only a partially cached page; feuser is USER_INT page.5647 < plugin.tx_felogin_pi1 # set page title via cached plugin page.5700 = USER page.5700.userFunc = Reelworx\Pagetitletest\CachedPlugin->main # set page title via uncached plugin page.5800 = USER_INT page.5800.userFunc = Reelworx\Pagetitletest\UncachedPlugin->main # if this is enabled it will always win config.titleTagFunction = Reelworx\Pagetitletest\TitleTagFunction->main
Test cases¶
(Always access the pages in a browser where you do NOT have an active BE login)
1.) Disable 5700 and 5800 and titleTagFunction => you will see the normal page title
2.) Disable 5800 and titleTagFunction => you see the sitename + "Cached Plugin has modified Title" with '::::' as separator
3.) Disable titleTagFunction => you see the sitename + "Un-cached Plugin has modified Title" with '::::' as separator
4.) Disable 5700 and titleTagFunction => you see the sitename + "Un-cached Plugin has modified Title" with ':' as separator
5.) Keep titleTagFunction enabled => you see "Killed the page title ;-)" in any case
Updated by Markus Klein over 9 years ago
Please note that the use-case example above (pageTitleSeparator adjusted in USER object) does NOT work consistently currently.
This is due to the fact, that the template is reparsed in case we have *_INT objects on a page and ANY configuration loaded from the cache is just discarded, including our pageTitleSeparator from the USER object.
typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php:2502
resets the whole config$this->config['config'] = array();
Updated by Gerrit Code Review over 9 years ago
Patch set 1 for branch TYPO3_6-2 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/38959
Updated by Markus Klein over 9 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset d1670bbfa3ba6ce4d59c897511936c9cb73c59a7.
Updated by Riccardo De Contardi about 7 years ago
- Status changed from Resolved to Closed