Skip to content
Snippets Groups Projects
Commit d608b64c authored by Benni Mack's avatar Benni Mack
Browse files

[BUGFIX] Resolve WS overlays in Extbase JOIN queries properly

When having JOINs in SQL selects, which typically happens
when a MM property is resolved via Extbase's ORM, versionOL()
threw an SQL error because versionOL() also queried "uid_local"
which did not exist in e.g. sys_category.

This change splits up the massive "overlayLanguageAndWorkspace()"
method into smaller chunks and takes a different route when
doing workspace overlays for JOINs. By re-fetching the main tables'
record, all known fields can be identified via array_key_intersect()
and then chunked together again with the JOINed information
via array_replace().

The added tests show that the assertion for MM relations now work
(if the fix is not applied, the included tests fail due to a SQL error in tests),
but deliver a wrong result, which will be fixed with
https://review.typo3.org/c/Packages/TYPO3.CMS/+/68913

Resolves: #81208
Resolves: #93484
Releases: master, 10.4
Change-Id: Iaba70be0cf5b7a36ab13380940286628ac976f9a
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/68915


Tested-by: default avatarOliver Bartsch <bo@cedev.de>
Tested-by: default avatarcore-ci <typo3@b13.com>
Tested-by: default avatarNikita Hovratov <nikita.h@live.de>
Tested-by: default avatarBenni Mack <benni@typo3.org>
Reviewed-by: default avatarOliver Bartsch <bo@cedev.de>
Reviewed-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: default avatarRalf Merz <mail@merzilla.de>
Reviewed-by: default avatarBenni Mack <benni@typo3.org>
parent fc6bf1f5
Branches
Tags
No related merge requests found
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