90682[BUGFIX] Use DataHandler for auto redirect creation
Commit message
Review
-
Code review CR +2 Done
- Oli Bartsch +2
- Bastien Lutz +1
- Oliver Hader +1
-
Verified V +2 Done
- Oli Bartsch +2
- Bastien Lutz +1
- Oliver Hader +1
- core-ci +1 CI
Issues 2
Files 5
- typo3/sysext/redirects/Classes/Controller/RecordHistoryRollbackController.php+15 −0
- typo3/sysext/redirects/Classes/Service/SlugService.php9+35 −33
- typo3/sysext/redirects/Classes/Service/TemporaryPermissionMutationService.php3new+80 −0
- typo3/sysext/redirects/Configuration/TCA/sys_redirect.php+2 −0
- typo3/sysext/redirects/Tests/Functional/Service/SlugServiceTest.php+2 −0
Review log 3956
Show 2031 earlier messages
-
Oli Bartsch uploaded patch set 1 09/14/25, 17:50
-
core-ci voted on patch set 1 V +1 09/14/25, 17:57 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/84962
-
Georg Ringer voted on patch set 1 CR +1 V +1 09/15/25, 06:42
-
Oli Bartsch commented on patch set 1 CR -2 09/15/25, 07:05
Redirect reverting for non admins does not work. Have to investigate. -
Oli Bartsch uploaded patch set 2
CR +1V +109/16/25, 09:03Copied Votes: * Code-Review-2 (copy condition: "changekind:NO_CHANGE OR **is:MIN**") -
core-ci voted on patch set 2 V +1 09/16/25, 09:10 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/85013
-
Mathias Brodala commented on patch set 2 09/16/25, 09:10
SlugService.php:154These three can be dropped, as these are the defaults. -
Oli Bartsch uploaded patch set 3
V +111/27/25, 09:53Copied Votes: * Code-Review-2 (copy condition: "changekind:NO_CHANGE OR **is:MIN**") -
core-ci voted on patch set 3 V -1 11/27/25, 10:07 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/91080
-
Stefan Bürk commented on patch set 3 11/27/25, 11:03
SlugService.php:154ReplyI disagree here. The redirect composed here is definitly not a regexp redirect and does not respect query parameters, using configured TCA defaults (which can be changed) would use the defaults ending in creating a broken redirect. Setting here describes the redirect which should be created. For custom redirect creation the `ModifyAutoCreateRedirectRecordBeforePersistingEvent` can be used to adopt the settings to the kind of redirect which should be created. Using TCA defaults here are risky epxecting to compose a redirect but only ensure half of the settings for the type of redirect to create. -
Mathias Brodala commented on patch set 3 11/28/25, 06:48
SlugService.php:154ReplyAcknowledged -
Bastien Lutz uploaded patch set 4
V -102/03/26, 11:49Copied Votes: * Code-Review-2 (copy condition: "changekind:NO_CHANGE OR **is:MIN**") -
core-ci voted on patch set 4 V -1 02/03/26, 12:02 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/94898
-
Bastien Lutz uploaded patch set 5
V -102/03/26, 13:02Copied Votes: * Code-Review-2 (copy condition: "changekind:NO_CHANGE OR **is:MIN**") -
core-ci voted on patch set 5 V -1 02/03/26, 13:17 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/94901
-
Bastien Lutz uploaded patch set 6
V -102/03/26, 13:46Copied Votes: * Code-Review-2 (copy condition: "changekind:NO_CHANGE OR **is:MIN**") -
core-ci voted on patch set 6 V -1 02/03/26, 14:23 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/94909
-
Bastien Lutz uploaded patch set 7
V -102/03/26, 14:57Copied Votes: * Code-Review-2 (copy condition: "changekind:NO_CHANGE OR **is:MIN**") -
core-ci voted on patch set 7 V +1 02/03/26, 15:08 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/94920
-
Simon Schaufelberger commented on patch set 7 CR -1 02/03/26, 15:43
CommandLineUserAuthentication.php:95I prefer the not operator here as comparison with false is strange.SystemUserAuthentication.php:32remove annotation and add type string here.SystemUserAuthentication.php:36useless commentSystemUserAuthentication.php:59remove useless annotationSystemUserAuthentication.php:67remove useless commentSystemUserAuthentication.php:94remove useless commentSystemUserAuthentication.php:95use ! operator insteadSystemUserAuthentication.php:106remove useless commentSystemUserAuthentication.php:112remove useless commentSystemUserAuthentication.php:123remove useless comment and add return bool to the methodSystemUserTrait.php:32remove useless commentSystemUserTrait.php:58this is not the TYPO3 code style. don't align the linesSystemUserTrait.php:70remove useless commentSystemUserTrait.php:76add an empty line before -
Bastien Lutz uploaded patch set 8
CR -1V +102/03/26, 16:10Copied Votes: * Code-Review-2 (copy condition: "changekind:NO_CHANGE OR **is:MIN**") -
Bastien Lutz uploaded patch set 9 02/03/26, 16:11
Copied Votes: * Code-Review-2 (copy condition: "changekind:NO_CHANGE OR **is:MIN**") -
core-ci voted on patch set 8 V -1 02/03/26, 16:20 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/94928
-
core-ci voted on patch set 9 V -1 02/03/26, 16:21 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/94929
-
Oliver Hader commented on patch set 9 CR -1 02/03/26, 16:59
SystemUserAuthentication.php:24I understand the necessity of having an actor that has "system capabilities" (thus, basically allowed to modify anything, since the action has been started by the system). However, I'd not opt for extending the existing `*UserAuthentication` scope here, since session data, passwords etc. are most probably not required here. Unfortunately there are still hard requirements in `DataHandler` to have an instance of this object, having a user-id (basically for logging purposed) and similar constraints. Thus, for the time being (due to the lack of alternatives), I'd recommend to make this new class `final` and `@internal`. There's only an unfinished idea of introducing a `Principal` (a generic "user" with generic permissions) at https://review.typo3.org/c/Packages/TYPO3.CMS/+/92214/2/typo3/sysext/core/Classes/Security/PermissionSet/Principal.php -
Oliver Hader commented on patch set 9 02/03/26, 17:10
In an way, I think addressing the redirects issue and introducing a new system-user role should be handled in two different patches. -
Oliver Hader commented on patch set 9 02/04/26, 10:13
Reply
Update as discussed during the code sprint in Rosenheim: Instead of using a new system-user or using the `admin` flag of the existing `BE_USER`, the table-modify permissions of the current user shall be adjusted temporarily for the `sys_redirects` table. -
Bastien Lutz uploaded patch set 10
CR -1V -102/04/26, 11:17Copied Votes: * Code-Review-2 (copy condition: "changekind:NO_CHANGE OR **is:MIN**") -
core-ci voted on patch set 10 V +1 02/04/26, 11:28 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/95011
-
Bastien Lutz uploaded patch set 11
V +102/04/26, 15:21Copied Votes: * Code-Review-2 (copy condition: "changekind:NO_CHANGE OR **is:MIN**") -
core-ci voted on patch set 11 V -1 02/04/26, 16:11 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/95056
-
Oliver Hader commented on patch set 11 02/05/26, 09:38
SlugService.php:77Just concerning wording, I'd use something like `TemporaryPermissionMutationService` (avoiding "fake")SlugService.php:178Error handling would be nice here: * what if `$record['uid'] === null` (persistence in datahander did not work) * checking `$dataHandler->errorLog` * add a new log entry in case something went wrong -
Bastien Lutz uploaded patch set 12
V -102/05/26, 10:05Copied Votes: * Code-Review-2 (copy condition: "changekind:NO_CHANGE OR **is:MIN**") -
core-ci voted on patch set 12 V +1 02/05/26, 10:23 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/95124
-
Bastien Lutz uploaded patch set 13
V +102/05/26, 10:57Copied Votes: * Code-Review-2 (copy condition: "changekind:NO_CHANGE OR **is:MIN**") -
core-ci voted on patch set 13 V -1 02/05/26, 11:13 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/95130
-
Bastien Lutz uploaded patch set 14
V -102/05/26, 11:48Copied Votes: * Code-Review-2 (copy condition: "changekind:NO_CHANGE OR **is:MIN**") -
core-ci voted on patch set 14 V +1 02/05/26, 11:58 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/95139
-
Oli Bartsch commented on patch set 14 CR -2 02/05/26, 12:29
TemporaryPermissionMutationService.php:24Please work on arrays -
Bastien Lutz uploaded patch set 15
V +102/05/26, 13:01Copied Votes: * Code-Review-2 (copy condition: "changekind:NO_CHANGE OR **is:MIN**") -
core-ci voted on patch set 15 V +1 02/05/26, 13:39 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/95146
-
Oli Bartsch uploaded patch set 16
V +102/05/26, 15:39Copied Votes: * Code-Review-2 (copy condition: "changekind:NO_CHANGE OR **is:MIN**") -
Oli Bartsch commented on patch set 16 CR +1 V +1 02/05/26, 15:40
SlugService.php:77ReplyDone -
Oli Bartsch commented on patch set 16 02/05/26, 15:40
Reply
DoneCommandLineUserAuthentication.php:95ReplyDoneSystemUserAuthentication.php:24ReplyDoneSystemUserAuthentication.php:32ReplyDoneSystemUserAuthentication.php:36ReplyDoneSystemUserAuthentication.php:59ReplyDoneSystemUserAuthentication.php:67ReplyDoneSystemUserAuthentication.php:94ReplyDoneSystemUserAuthentication.php:95ReplyDoneSystemUserAuthentication.php:106ReplyDoneSystemUserAuthentication.php:112ReplyDoneSystemUserAuthentication.php:123ReplyDoneSystemUserTrait.php:32ReplyDoneSystemUserTrait.php:58ReplyDoneSystemUserTrait.php:70ReplyDoneSystemUserTrait.php:76ReplyDoneSlugService.php:178ReplyDoneTemporaryPermissionMutationService.php:24ReplyDone -
Bastien Lutz commented on patch set 16 CR +1 02/05/26, 15:41
Reply
DoneCommandLineUserAuthentication.php:95ReplyDoneSystemUserAuthentication.php:24ReplyDoneSystemUserAuthentication.php:32ReplyDoneSystemUserAuthentication.php:36ReplyDoneSystemUserAuthentication.php:59ReplyDoneSystemUserAuthentication.php:67ReplyDoneSystemUserAuthentication.php:94ReplyDoneSystemUserAuthentication.php:95ReplyDoneSystemUserAuthentication.php:106ReplyDoneSystemUserAuthentication.php:112ReplyDoneSystemUserAuthentication.php:123ReplyDoneSystemUserTrait.php:32ReplyDoneSystemUserTrait.php:58ReplyDoneSystemUserTrait.php:70ReplyDoneSystemUserTrait.php:76ReplyDoneSlugService.php:77ReplyDoneSlugService.php:178ReplyDoneTemporaryPermissionMutationService.php:24ReplyDone -
Bastien Lutz voted on patch set 16 V +1 02/05/26, 15:42
-
core-ci voted on patch set 16 V +1 02/05/26, 15:50 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/95176
-
Oliver Hader commented on patch set 16 02/05/26, 15:53
On it.. -
Oliver Hader uploaded patch set 17
CR +1V +102/05/26, 16:17 -
Oliver Hader voted on patch set 17 CR +1 V +1 02/05/26, 16:17
-
Oliver Hader commented on patch set 17 02/05/26, 16:17
Reply
Done -
Bastien Lutz voted on patch set 17 CR +1 V +1 02/05/26, 16:22
-
core-ci voted on patch set 17 V +1 02/05/26, 16:28 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/95181
-
Oli Bartsch voted on patch set 17 CR +2 V +2 02/05/26, 16:30
-
Oli Bartsch merged patch set 18 02/05/26, 16:30
-
Sybille Peters commented on patch set 18 03/10/26, 10:57
Unresolved
Hi, I think this patch might have caused problems with permissions because via DataHandler more permissions are checked for current user, see https://forge.typo3.org/issues/109199 Can you take a look? Thanks. Specifically, in DataHandler::hasPagePermission is called with the site root and this returns false if site root page is not in web mount: if (!$pagesSchema->hasCapability(TcaSchemaCapability::RestrictionWebMount) && !$this->BE_USER->isInWebMount($page, '', $useDeleteClause)) { return false; }