Review main Merged

68913[BUGFIX] Extbase Relations are resolved properly in workspaces

Benni Mack CR +2 V +2 Normal +95 −6 updated 08/05/21, 08:13

Commit message

Referencing other records in workspaces usually works in a way
that it is always pointing to the live pendant of a versioned record,
never to the versioned record (t3ver_oid>0). However, for MM this is
the exception - because MM does not have the workspace context.

So when Extbase is resolving a separate query to resolve e.g. a category
from a news record, the MM handling kicks in, but always showed the live
version, because there was no chance to overlay.

Extbase internally first fetches the aggregate root (e.g. news), then does
the overlay and building of the object of the main object, and then fires
another query to fetch e.g. all attached categories / relations. In case
of MM relations for workspaces, they need to be using the versionedUid
of the news record, and not the live version.

However, since this also affects other relations (IRRE without MM,
Select + Group), the RelationHandler is used for workspace'd
relations, and adds one additional query to that.

This change adapts the place where the query for the properties
is built, and takes the UID of the versioned record to resolve the
properties attached to it.

Review

  • Code review CR +2

    Imported before Forger kept the single votes, the next import adds them.

  • Verified V +2

    Imported before Forger kept the single votes, the next import adds them.

Issues 4

Files 2