fluidpages icon indicating copy to clipboard operation
fluidpages copied to clipboard

Fix localization bug for page-layout (TYPO3 9)

Open ikonplant opened this issue 5 years ago • 3 comments

Add 'l10n_mode' => 'exclude' to the additional fields of page

ikonplant avatar Jun 28 '19 13:06 ikonplant

Hi @ikonplant,

What is the bug you intend to fix? Why is the solution to make these fields not translatable?

NamelessCoder avatar Jul 01 '19 09:07 NamelessCoder

Hi @NamelessCoder !

The reason is the new localization logic in TYPO3 9.

With your original TCA the value of tx_fed_page_controller_action is not inherited within translated pages (field value in the database).

For example, we need this value in frontend in fluid template: <v:variable.set value="{v:page.info(field: 'tx_fed_page_controller_action')}" name="pageLayout"/>

With your original TCA, the db-field tx_fed_page_controller_action and the variable pageLayout have only value within original page/language, the localization is not synchronized.

'l10n_mode' => 'exclude', causes that the according db-field tx_fed_page_controller_action is filled within translated page (synchronized), once the layout is set/changed via backend => pageLayout has correct value.

ikonplant avatar Jul 01 '19 09:07 ikonplant

Thanks @ikonplant - have you checked how this affects TYPO3 8.7? I hesitate to merge since I suspect the instruction causes the field to not be used from pages_language_overlay on 8.7, which would constitute a breaking change.

For the time being, please set this from your provider extension's Configuration/TCA/Overrides/pages.php file - your provider's configuration will be loaded after fluidpages so you can freely manipulate the TCA. That way you get the desired behavior and we don't risk changing the current default behavior for people ;)

I'll leave the PR open in case others come across the use case and considers it a bug / for when the next major version of Fluidpages gets made.

NamelessCoder avatar Oct 10 '19 12:10 NamelessCoder