Task #79243

Task #79241: Streamline usage of l10n_mode

Remove l10n_mode mergeIfNotBlank

Added by Oliver Hader over 2 years ago. Updated 12 months ago.

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

100%

TYPO3 Version:
8
PHP Version:
7.1
Tags:
Complexity:
Sprint Focus:

Description

Remove the functionality of l10n_mode mergeIfNotBlank without any further replacement. Values shall be cloned from parent language record to particular localized record if the value is empty/blank there. There won't be any further behavior during frontend rendering to retrieve the value either from the parent language record or localized record during runtime.


Related issues

Related to TYPO3 Core - Task #79281: Move DatabaseL10nModeUpdate to a row updater Closed 2017-01-12
Related to TYPO3 Core - Feature #79658: Introduce allowLanguageSynchronization Closed 2017-02-07

Associated revisions

Revision dff93991 (diff)
Added by Oliver Hader over 2 years ago

[!!!][TASK] Remove TCA l10n_mode=mergeIfNotBlank

The TCA setting "l10n_mode=mergeIfNotBlank" for a single
column is removed from the list of values.

The functionality was there to use the value of a field
of the original record, if the value of the translated record
is empty (or trim'ed empty), and is then overlaid.

The new behaviour is to duplicate the behaviour during
the localize process, and then completely separate.

As a result the related TypoScript setting
config.sys_language_softMergeIfNotBlank is not required
anymore and is removed as well.

Resolves: #79243
Releases: master
Change-Id: I55f3ebd2fe2ddd8412101d5496a0da3c5ab64c68
Reviewed-on: https://review.typo3.org/51239
Tested-by: TYPO3com <>
Reviewed-by: Susanne Moog <>
Tested-by: Susanne Moog <>
Reviewed-by: Benni Mack <>
Tested-by: Benni Mack <>

Revision 23870ae1 (diff)
Added by Christian Kuhn over 2 years ago

[TASK] Move DatabaseL10nModeUpdate to a row updater

The new DatabaseL10nModeUpdate install tool upgrade wizard that
migrates row content for old "mergeIfNotBlank" fields is now
implemented as the first consumer of the new row updater upgrade
wizard.

Change-Id: If7495ef09e06c5fd611fe95feff640c67d3a672b
Resolves: #79281
Related: #79243
Related: #79279
Releases: master
Reviewed-on: https://review.typo3.org/51277
Tested-by: TYPO3com <>
Reviewed-by: Oliver Hader <>
Tested-by: Oliver Hader <>
Reviewed-by: Benni Mack <>
Tested-by: Benni Mack <>

Revision 2fd70c83 (diff)
Added by Oliver Hader over 2 years ago

[FEATURE] Introduce allowLanguageSynchronization

This feature introduces a new functionality called
"allowLanguageSynchronization" which can be set on a field
configuration of a TCA column. This is the successor of
"l10n_mode=mergeIfNotBlank" as the old option had several
conceptual downsides:

1) "mergeIfNotBlank" took the value of the default record
during runtime, but only if the translation field was empty.
This means it was not possible to see what the record
actually contained without having all fields of the parent
at hand.

2) It was not possible to have a value "santa" in the original
record but remove the option in a translation (because an
empty string "" implicitly triggered the runtime call in the
frontend)

3) "mergeIfNotBlank" did not work on relations except for files
fetched via the FileRepository API calls, but for no other
inline elements.

4) "mergeIfNotBlank" did the overlay functionality in the frontend,
but only FormEngine and DataHandler took care of the option.
Custom backend modules had to implement the same functionality.

5) In FormEngine, there was an icon in the translation record that
if the record kept empty the value of the original language was
taken, but this is not optimal in terms of usability.

6) "mergeIfNotBlank" did not take the new l10n_source option into
account, where localizations could be made from other records
than the default language "0".

The new feature can be set on any TCA column setting:

$GLOBALS['TCA'][<table-name>]['columns']
[<field-name>]['config']['behaviour']
['allowLanguageSynchronization'] = true;

This brings an option to records with translations (both from
l10n_parent and l10n_source) to have the value for all translations
synchronized or explictly have a checkbox to use a custom value.

The information whether a field is custom filled, or kept in sync
from l10n_parent/l10n_source is stored in a separate field called
"l10n_state" inside the database.

The introduced upgrade wizard and TCA migration to remove
"l10n_mode=mergeIfNotBlank" has been modified to migrate to this
option and add a l10n_state database field if a TCA table used
"mergeIfNotBlank" but did not add the l10n_state field manually
via ext_tables.sql yet.

New extensions can easily use the new option right away,
extensions that need to stay compatible with v7 and v8 can add
both options right away to have the same output.

The main goals to achieve with this change is now:

  • Have consistent database values for all records regardless
    of l10n_mode=mergeIfNotBlank paving the way to fetch translated
    records without having to overlay (once l10n_mode=exclude is
    also copying values and relations)
  • Be more explicit for editors about records that have a different
    or the same state as their l10n_parent/l10n_source as a benefit
    for bigger instances with a lot of languages
  • Avoid hidden magic when retrieving localized records in the
    TYPO3 Frontend.

Resolves: #79658
Related: #79243
Releases: master
Change-Id: I6c2dbfeb09b47f958a536c9ab050c24ba4bbcbbd
Reviewed-on: https://review.typo3.org/51291
Tested-by: TYPO3com <>
Reviewed-by: Frans Saris <>
Tested-by: Frans Saris <>
Reviewed-by: Georg Ringer <>
Tested-by: Georg Ringer <>
Reviewed-by: Christian Kuhn <>
Tested-by: Christian Kuhn <>

History

#1 Updated by Gerrit Code Review over 2 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/51239

#2 Updated by Gerrit Code Review over 2 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/51239

#3 Updated by Gerrit Code Review over 2 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/51239

#4 Updated by Gerrit Code Review over 2 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/51239

#5 Updated by Gerrit Code Review over 2 years ago

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

#6 Updated by Gerrit Code Review over 2 years ago

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

#7 Updated by Gerrit Code Review over 2 years ago

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

#8 Updated by Gerrit Code Review over 2 years ago

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

#9 Updated by Gerrit Code Review over 2 years ago

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

#10 Updated by Gerrit Code Review over 2 years ago

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

#11 Updated by Gerrit Code Review over 2 years ago

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

#12 Updated by Gerrit Code Review over 2 years ago

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

#13 Updated by Gerrit Code Review over 2 years ago

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

#14 Updated by Oliver Hader over 2 years ago

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

#15 Updated by Benni Mack 12 months ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF