Skip to content
Snippets Groups Projects
Commit 108d61a2 authored by Stefan Bürk's avatar Stefan Bürk
Browse files

[BUGFIX] Use correct record data in ext:redirect datahandler hook

ext:redirects provides the feature to eventually update subpage
slugs and automatically create redirects for changed pages. To
accomplish that, a combination of two DataHandler hooks are used
along with a centralized service. The service is used before the
page slug change is persistent to the database. Hook execution
for subpage changes are disabled, to contain all changes in one
correlation for eventually reverting.

With #99188 the auto-create chain has been streamlined to prepare
for further changes. However, added functional tests do not reflect
the real procedure properly. Because of that it has been overlooked
that the direct slug change which triggers is handled by the hook
works with old record, thus creating invalid page slug updates and
redirects for the children pages.

This change now properly combine the update data with the current
record data instead of retrieving not-yet updated data from the
database. Corresponding functional tests are adopted to update
the records after calling the hook implementation, which reflects
real procedure order.

Resolves: #99506
Related: #99188
Releases: main
Change-Id: Ib2fac341483b863ee20c228dfb6c8a06ea1978f9
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/77318


Tested-by: default avatarcore-ci <typo3@b13.com>
Tested-by: default avatarStefan Froemken <froemken@gmail.com>
Tested-by: default avatarStefan Bürk <stefan@buerk.tech>
Tested-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: default avatarStefan Froemken <froemken@gmail.com>
Reviewed-by: default avatarStefan Bürk <stefan@buerk.tech>
parent 5db962e9
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