Skip to content

[BUGFIX] Do not preview website title if config.showWebsiteTitle is false - #655

Merged
RinyVT merged 1 commit into
Yoast:mainfrom
Mabahe:bugfix/654-showWebsiteTitle-no-effect
Jun 19, 2026
Merged

[BUGFIX] Do not preview website title if config.showWebsiteTitle is false#655
RinyVT merged 1 commit into
Yoast:mainfrom
Mabahe:bugfix/654-showWebsiteTitle-no-effect

Conversation

@Mabahe

@Mabahe Mabahe commented May 12, 2026

Copy link
Copy Markdown
Contributor

Test instructions

This PR can be tested by following these steps:

  • Set Typoscipt config.showWebsiteTitle = 0 and have a website title configured in the site you still see the title in the preview sometimes

Quality assurance

  • I have tested this code to the best of my abilities
  • I have added unittests to verify the code works as intended

Fixes #654

…alse

Also removes code fetching the sitetitle from typoscript which was
deprecated in TYPO3 version 10 and removed in version 11.

Resolves: Yoast#654
@RinyVT

RinyVT commented May 27, 2026

Copy link
Copy Markdown
Collaborator

Hi @Mabahe,

Thanks for the PR! Something that was missed during the 12 upgrade I see.
One thing, is there are particular reason you've also removed the $GLOBALS['TSFE']->tmpl->setup['sitetitle'] line?

Although sitetitle was from typoscript records which is not something that's in core anymore, technically when someone sets it directly in their typoscript setup it would still work and removing this line would be breaking.

Is it okay if I restore that line (with a todo comment) or did this line also produce a bug?

@Mabahe

Mabahe commented May 27, 2026

Copy link
Copy Markdown
Contributor Author

Hi @RinyVT,

you can access $GLOBALS['TSFE']->tmpl only < v13 and fetching the sitetitle from typoscript was
deprecated in TYPO3 version 10 and removed in version 11 (see my commit message), so that hasn't been working for ages.

@Mabahe

Mabahe commented May 27, 2026

Copy link
Copy Markdown
Contributor Author

@RinyVT

RinyVT commented Jun 19, 2026

Copy link
Copy Markdown
Collaborator

Good point, although it would technically be a breaking change (if someone has set sitetitle manually on the root typoscript setup this would break) I consider it a bugfix as it is indeed old functionality.
Thanks for the PR, will merge it now!

@RinyVT
RinyVT merged commit 49d5cbe into Yoast:main Jun 19, 2026
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AdditionalPreviewData adds website title when showWebsiteTitle is false

2 participants