Project

General

Profile

Actions

Bug #66499

closed

double site title

Added by Alex Borodinov almost 9 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Must have
Assignee:
Category:
Frontend
Target version:
Start date:
2015-04-20
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
6.2
PHP Version:
5.4
Tags:
Complexity:
hard
Is Regression:
Yes
Sprint Focus:
Stabilization Sprint

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

Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Bug #62080: $GLOBALS['TSFE']->page['title'] in USER doesn't work anymore for cached pagesClosedMarkus Klein2014-10-07

Actions
Related to TYPO3 Core - Bug #66605: TSFE: config get overridden on cached pageClosedMarkus Klein2015-04-27

Actions
Actions #1

Updated by Markus Klein almost 9 years ago

  • Status changed from New to Needs Feedback

Please provide your TypoScript setup here.

Actions #2

Updated by Alex Borodinov almost 9 years ago

Actions #3

Updated by Alex Borodinov almost 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 template is sitetitle field in web->template template tools, and "Main page" is the page title of the current page.

Actions #4

Updated by Markus Klein almost 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/

Actions #5

Updated by Tilo Baller almost 9 years ago

Same here since updating to 6.2.12.
Reverting the patch #62080 solves it for me.

Actions #6

Updated by Markus Klein almost 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.

Actions #7

Updated by Alex Borodinov almost 9 years ago

as for me, this bug comes from felogin and ke_search.

Actions #8

Updated by Markus Klein almost 9 years ago

felogin (from Core) for sure does not manipulate the page title!

Actions #9

Updated by Alex Borodinov almost 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.

Actions #10

Updated by Tilo Baller almost 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.

Actions #11

Updated by Markus Klein almost 9 years ago

So you mean this happens if more than 1 _INT object is on a single page?

Actions #12

Updated by Tilo Baller almost 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.

Actions #13

Updated by Markus Klein almost 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.

Actions #14

Updated by Markus Klein almost 9 years ago

  • Complexity set to hard
Actions #15

Updated by Markus Klein almost 9 years ago

This is the 4th iteration on this topic now since 6.2 or so. OMG, I hate it.

Actions #16

Updated by Markus Klein almost 9 years ago

  • Sprint Focus set to Stabilization Sprint
Actions #17

Updated by Gerrit Code Review almost 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

Actions #18

Updated by Gerrit Code Review almost 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

Actions #19

Updated by Markus Klein almost 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
Actions #20

Updated by Markus Klein almost 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.

Actions #21

Updated by Alex Borodinov almost 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

Actions #22

Updated by Tilo Baller almost 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).

Actions #23

Updated by Alex Borodinov almost 9 years ago

@Tilo: Yes, you're right, i made a typo in the code. Now it's working as expected

Actions #24

Updated by Gerrit Code Review almost 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

Actions #25

Updated by Markus Klein almost 9 years ago

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

Actions #26

Updated by Markus Klein almost 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();

Actions #27

Updated by Gerrit Code Review almost 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

Actions #28

Updated by Markus Klein almost 9 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #29

Updated by Riccardo De Contardi over 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF