Project

General

Profile

Actions

Bug #91699

closed

page record used in condition matcher is not translated

Added by Lars Peter Søndergaard almost 4 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2020-06-23
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
9
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

I have a condition like:

[page["seo_title"] != ""]
    config.pageTitle.cObject = TEXT
    config.pageTitle.cObject.data = page:seo_title
[END]

With the TypoScript configuration:

config.pageTitleSeparator = -
config.pageTitleSeparator.noTrimWrap = | | |
config.pageTitleFirst = 1

And the templates sitetitle is set to some non empty value.

This generates somewhat decent title in case seo_title is empty and the condition above allows the editors to override the full title using the seo_title in case something special is needed.
Sadly, you cannot override the full title using a custom PageTitleProvider. The sitetitle part always stays untouched.

Now the Problem is: It seems the page variable used in the condition does not yet have the translation overlay applied to it. So in the case where the default language has seo_title set to some non empty value, but in the translated page the seo_title field is still empty, the Condition still evaluates to true when visiting the translated page in the frontend and therefor tries to output the contents of seo_title using the pageTitle.cObject override. Which is going to fail since the field is empty for the translation (no title is output).

The same happens in TYPO3 10 as well.

Actions

Also available in: Atom PDF