Project

General

Profile

Actions

Bug #23736

closed

Condition with globalVar TSFE does not care about page language overlay

Added by Patrick Lobacher over 13 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Should have
Assignee:
Category:
Localization
Target version:
-
Start date:
2010-10-15
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
7
PHP Version:
5.5
Tags:
Complexity:
easy
Is Regression:
No
Sprint Focus:

Description

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)


Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Bug #89285: TYPO3 regenerates cached page every page reload for specific TypoScriptClosed2019-09-26

Actions
Related to TYPO3 Core - Bug #98126: Page caching does not work as expected on multi language sitesClosedStefan Bürk2022-08-12

Actions
Actions #1

Updated by Alexander Opitz over 10 years ago

  • Category deleted (Communication)
  • Status changed from New to Needs Feedback
  • Target version deleted (0)
  • Is Regression set to No

Hi,

as this issue is very old. Does the problem still exists within newer versions of TYPO3 CMS (4.5 or 6.1)?

Actions #2

Updated by Alexander Opitz about 10 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.

Actions #3

Updated by Mateusz Wojtuła almost 9 years ago

  • Status changed from Closed to New

Hi,
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.

Actions #4

Updated by Riccardo De Contardi about 8 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:

My test:
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.

RESULTS:

- 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

Actions #5

Updated by Riccardo De Contardi almost 8 years ago

As far as I can see it is still present on bot 8.2-dev and 7.6.6

Actions #6

Updated by Thomas Mayer about 7 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.

Actions #7

Updated by Sascha Löffler about 7 years ago

possibly related.

I found in a TYPO3 v7.6.11 Installation with 2 languages

using

  5 = TEXT
  5.field = subtitle // title

results in printing always the default language.

However using

  5 = TEXT
  5.data = page:title

correctly gives the translated page title.

no MetaSeo installed.

Actions #8

Updated by Benni Mack almost 7 years ago

  • Assignee set to Benni Mack
  • Complexity set to easy

Probably easy to fix but still breaking I guess.

When instantiating the global cObj to do so the overlaid record should be used. Will see if I can fix this.

Actions #9

Updated by Riccardo De Contardi almost 6 years ago

Seems still present even on 9.2.0-dev (latest master)

Actions #10

Updated by Riccardo De Contardi about 5 years ago

I can confirm this bug on 9.5.4

Test performed

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]

Result:
"Hello world" is still visible on the default language page

Actions #11

Updated by Christian Eßl over 4 years ago

Problem is still present in TYPO3 10.2.-DEV

  • In TypoScriptFrontendController ::getConfigArray() the TemplateService will first be instantiated .
  • Booting up the TemplateService by calling TemplateService::start(), this will do some ts condition matching (for determining the cache identifier)
  • Only after getConfigArray() is executed, TypoScriptFrontendController::settingLanguage() is called, which will overlay the page rootline with its translations.

So changes would have to be made to overlay the page translations, when the page rootline is initially built. However this would probably break some behaviour with existing ts conditions...

Actions #12

Updated by Christian Eßl over 4 years ago

  • Related to Bug #89285: TYPO3 regenerates cached page every page reload for specific TypoScript added
Actions #13

Updated by Gerrit Code Review over 3 years ago

  • Status changed from New 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 https://review.typo3.org/c/Packages/TYPO3.CMS/+/65044

Actions #14

Updated by Gerrit Code Review over 3 years ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/65044

Actions #15

Updated by Gerrit Code Review over 3 years ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/65044

Actions #16

Updated by Gerrit Code Review over 3 years ago

Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/65044

Actions #17

Updated by Benni Mack over 3 years ago

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

Updated by Benni Mack over 3 years ago

  • Status changed from Resolved to Closed
Actions #19

Updated by Stefan Bürk over 1 year ago

  • Related to Bug #98126: Page caching does not work as expected on multi language sites added
Actions

Also available in: Atom PDF