[BUGFIX] Resolve correct page in slug validation 29/58229/8
authorOliver Hader <oliver@typo3.org>
Sat, 8 Sep 2018 12:54:45 +0000 (14:54 +0200)
committerOliver Hader <oliver.hader@typo3.org>
Sat, 27 Oct 2018 20:37:55 +0000 (22:37 +0200)
commit342e7bff84927406f7b63cc846ce759b8a437926
tree13e465f1d3645cf146d7d2e3fc05bfe5d4fc4cd5
parent5178ce52f1656a18b945b8c7642464bddf06bb94
[BUGFIX] Resolve correct page in slug validation

The SlugHelper now receives an encapsulated RecordState object that
represents a record.

This allows fine-grained control over a record and helps resolving
related information, which is required to resolve slugs properly in a
case where e.g. the node ("parent") and language uid can occur multiple
times.

The RecordState contains:

- an EntityContext which describes a variant of a record by its language
  and workspace assignment

- a node object (EntityPointer) that points to the node (aka "parent") of
  the record

- a EntityUidPointer that describes the origin of the record by its table
  name and uid

The RecordStateFactory creates such RecordState objects and enriches them
with links (EntityPointerLink) that point to languages and versions, that
are also represented by EntityPointer implementations.

Resolves: #86195
Releases: master
Change-Id: If17a30e98f802825d80e95044572153f2426bea2
Reviewed-on: https://review.typo3.org/58229
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Andreas Wolf <andreas.wolf@typo3.org>
Tested-by: Daniel Goerz <daniel.goerz@posteo.de>
Reviewed-by: Susanne Moog <susanne.moog@typo3.org>
Reviewed-by: Oliver Hader <oliver.hader@typo3.org>
Tested-by: Oliver Hader <oliver.hader@typo3.org>
typo3/sysext/backend/Classes/Controller/FormSlugAjaxController.php
typo3/sysext/core/Classes/DataHandling/DataHandler.php
typo3/sysext/core/Classes/DataHandling/Model/EntityContext.php [new file with mode: 0644]
typo3/sysext/core/Classes/DataHandling/Model/EntityPointer.php [new file with mode: 0644]
typo3/sysext/core/Classes/DataHandling/Model/EntityPointerLink.php [new file with mode: 0644]
typo3/sysext/core/Classes/DataHandling/Model/EntityUidPointer.php [new file with mode: 0644]
typo3/sysext/core/Classes/DataHandling/Model/RecordState.php [new file with mode: 0644]
typo3/sysext/core/Classes/DataHandling/Model/RecordStateFactory.php [new file with mode: 0644]
typo3/sysext/core/Classes/DataHandling/SlugHelper.php
typo3/sysext/install/Classes/Updates/PopulatePageSlugs.php