Bug #23736

Condition with globalVar TSFE does not care about page language overlay

Added by Patrick Lobacher over 8 years ago. Updated about 2 months ago.

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

0%

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)

History

#1 Updated by Alexander Opitz over 5 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)?

#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

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.

#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:

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

#5 Updated by Riccardo De Contardi almost 3 years ago

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

#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

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.

#8 Updated by Benni Mack almost 2 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.

#9 Updated by Riccardo De Contardi 12 months ago

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

#10 Updated by Riccardo De Contardi about 2 months 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 translated page

Also available in: Atom PDF