Review 10.4 Merged

68612[BUGFIX] Add pid restriction when getting previousLocalizedRecord

Christian Kuhn CR +2 V +2 Hard +512 −2 updated 03/25/21, 16:53

Commit message

Scenario:
A content element 'ce-1-default' exists on a 'source' page. It
has a 'free mode' localization 'ce-1-localized'. The localized
content element thus has l18n_parent=0 (free mode) and
l10n_source='id-of-ce-1-default' - it has been derived from
'ce-1-default'.

Now 'ce-1-default' is moved to a different 'target' page. Due to
free mode, 'ce-1-localized' is NOT moved along with it's localization
source, but keeps l10n_source='id-of-ce-1-default' (this needs to be
discussed if we change this) and stays on 'source' page. This is ok.

Now, a new content element 'ce-2-default' is added on 'target' page,
right below the previously moved 'ce-1-default'. And then, this element
is localized.

DataHandler now tries to find out where to create this localized
'ce-2-localized' record relative to other records. It find the
localization 'ce-1-localized' due to it's l10n_source indicator
and then creates 'ce-2-localized' after 'ce-1-localized'. On the
source page!
So the content element localization ends up on a different page,
which is of course wrong, misleading and hard to understand!

To fix this, the Datahandler now finds translated content elements
of a given content element only if it is on the same page. This
keeps this 'relative-to' magic, and the content element does not
end up on some foreign page.

Review

  • Code review CR +2 Done
    • Christian Kuhn +2
  • Verified V +2 Done
    • Christian Kuhn +2
    • TYPO3com +1 CI
    • core-ci +1 CI

Issues 2

Files 17

Review log 48

  1. Christian Kuhn uploaded patch set 1 03/24/21, 19:13

  2. TYPO3com voted on patch set 1 V -1 03/24/21, 19:20 Completed build in 07m 22s on Wed, 24 Mar, 07:20 PM Test Summary: 75909 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC104-1258

  3. Christian Kuhn uploaded patch set 2 03/24/21, 19:23

  4. core-ci voted on patch set 1 V -1 03/24/21, 19:27 Core CI is not happy: https://core.b13.com/typo3-core/typo3.cms/-/pipelines/1818

  5. TYPO3com voted on patch set 2 V +1 03/24/21, 19:31 Completed build in 07m 36s on Wed, 24 Mar, 07:31 PM Test Summary: 75909 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC104-1259

  6. core-ci voted on patch set 2 V +1 03/24/21, 19:41 Core CI is happy: https://core.b13.com/typo3-core/typo3.cms/-/pipelines/1821

  7. Christian Kuhn voted on patch set 2 V +2 CR +2 03/25/21, 16:53

  8. Christian Kuhn merged patch set 3 03/25/21, 16:53