Condition with globalVar TSFE does not care about page language overlay
Image you have an additional field (in my case a checkbox) within the pages table, named tx_ext_field.
This is a page language overlay field (and defined so in the localconf.php), so you can enter different values for the page and the translation - which works perfect in the backend form (and database table as well of course).
If you now want to create a condition like:
[globalVar = TSFE:page|tx_ext_field = 1]
It fires ONLY if the value is entered in the page properties of the default language and doesn't care about the setting in the language overlay record.
In the same script the following line gives the correct value back:
something.data = TSFE:page|tx_ext_field
So I think that the TSFE calculation within the condition doesn't take account of the page language overlay while the stdWrap property "data" does as expected.
(issue imported from #M15999)
#2 Updated by Alexander Opitz about 5 years ago
- Status changed from Needs Feedback to Closed
No feedback within the last 90 days => closing this ticket.
If you think that this is the wrong decision or experience this issue again, then please write to the mailing list typo3.teams.bugs with issue number and an explanation or open a new ticket and add a relation to this ticket number.
#3 Updated by Mateusz Wojtuła almost 4 years ago
- Status changed from Closed to New
I have found this bug in TYPO3 6.1.7. I am using this condition:
[globalVar = TSFE:page|tx_tqseo_pagetitle = ] temp.ptitle.10.1.NO.stdWrap.field = title [end]
If field "tx_tqseo_pagetitle" is empty for default language and filled for other language it return true on site with other language.
#4 Updated by Riccardo De Contardi about 3 years ago
- Category set to Localization
The problem is still present in TYPO3 6.2.17 and 7.6.4 as far as I can see:
1) install the "metaseo" extension that adds the field tx_metaseo_pagetitle on both pages and pages_language_overlay tables.
2) use this very minimalistic Typoscript:
config.no_cache=1 page > page=PAGE page.typeNum=0 [globalVar = TSFE:page|tx_metaseo_pagetitle = ] page.1 = TEXT page.1.value= Hello world page.1.wrap=<h1>|</h1> [end]
3) create a page and its equivalent in an alternate language
4) fill the field tx_metaseo_pagetitle on the alternate language page BUT NOT in the default language.
- both in standard and alternate language the "hello world" string is visible
P.S. : the same issue is present even using the "subtitle" field instead of tx_metaseo_pagetitle
#6 Updated by Thomas Mayer about 2 years ago
- TYPO3 Version changed from 4.3 to 7
- PHP Version changed from 5.3 to 5.5
Could this please be confirmed as a bug or denied?
I'm raising the TYPO3 version as presumably nobody cares about version 4.3 any more.
I just would like to know if this is a bug in the core or not. I did not really track it down myself.
#7 Updated by Sascha Löffler about 2 years ago
I found in a TYPO3 v7.6.11 Installation with 2 languages
5 = TEXT 5.field = subtitle // title
results in printing always the default language.
5 = TEXT 5.data = page:title
correctly gives the translated page title.
no MetaSeo installed.
#10 Updated by Riccardo De Contardi about 2 months ago
I can confirm this bug on 9.5.4
1) Create a page
2) translate it
3) fill the subtitle field on the translated page but not on the default language.
4) TS setup:
[page["subtitle"] == ""] page.1 = TEXT page.1.value= Hello world page.1.wrap=<h1>|</h1> [end]