Skip to content
Snippets Groups Projects
Commit e5dbc1e7 authored by Christian Kuhn's avatar Christian Kuhn Committed by Benni Mack
Browse files

[BUGFIX] No MM relations when localizing categories

"True" MM relations (those tables that have a "uid_local"
and "uid_foreign" db column and NO TCA) have a "local" and
a "foreign" side. For instance with categories, the category
table is the "local" side, and the referencing table "pages",
"tt_content", or whatever table, is the foreign side.

Without the patch, MM table rows when localizing the local
side of an MM relation is buggy, scenario:

A default language tt_content record references
a default language category. This gives one row in the mm
table. If now the category is localized, a second entry
from the localized category to the default language content
element is added. This is wrong.

The patch fixes this in the DataHandler by setting a
dedicated override for this "local side localization" scenario,
so the RelationHandler omits MM processing in this case. A
functional test is added for non-workspace that exists
for workspace already to verify a new relation can still
be added when creating the local side.

Note this is only half of the picture - MM relation should
still be set and updated when a localized foreign side exists
for the just localized local side. This does not happen
currently and leads to broken MM rows even with the patch. This
scenario however needs a bigger refactoring and further
increased coverage and will be handled with further patches.

Still, this patch is relatively straight forward, increases
test coverage for future patches and already solves various
long standing forge issues.

Change-Id: Ieee8b5a4c101065c03bc7e90c8a4aa36b1bdf6a7
Resolves: #89659
Resolves: #89620
Resolves: #91842
Resolves: #77902
Related: #70460
Related: #62727
Releases: master
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/71094


Tested-by: default avatarcore-ci <typo3@b13.com>
Tested-by: default avatarJochen <rothjochen@gmail.com>
Tested-by: default avatarOliver Bartsch <bo@cedev.de>
Tested-by: default avatarBenni Mack <benni@typo3.org>
Reviewed-by: default avatarJochen <rothjochen@gmail.com>
Reviewed-by: default avatarOliver Bartsch <bo@cedev.de>
Reviewed-by: default avatarBenni Mack <benni@typo3.org>
parent a034c620
Branches
Tags
No related merge requests found
Showing
with 84 additions and 31 deletions
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment