74186[FEATURE] Differentiate redirects based on creation type
Commit message
Review
-
Code review CR +2 Done
- Stefan Bürk +2
- Kevin Appelt +1
- Anja Leichsenring +1
-
Verified V +2 Done
- Stefan Bürk +2
- Kevin Appelt +1
- Anja Leichsenring +1
- core-ci +1 CI
Issues 1
Files 15
- typo3/sysext/core/Documentation/Changelog/12.1/Feature-97309-DifferentiateRedirectsBasedOnCreationType.rstnew+40 −0
- typo3/sysext/redirects/Classes/Command/CleanupRedirectsCommand.php+7 −0
- typo3/sysext/redirects/Classes/Controller/ManagementController.php+1 −0
- typo3/sysext/redirects/Classes/Repository/Demand.php10+36 −50
- typo3/sysext/redirects/Classes/Repository/RedirectRepository.php5+42 −12
- typo3/sysext/redirects/Classes/Service/SlugService.php3+1 −0
- typo3/sysext/redirects/Configuration/TCA/sys_redirect.php+19 −1
- typo3/sysext/redirects/Documentation/Images/RedirectEdit.pngbinary
- typo3/sysext/redirects/Documentation/Images/RedirectList.pngbinary
- typo3/sysext/redirects/Documentation/Usage/Index.rst+13 −2
- typo3/sysext/redirects/Resources/Private/Language/locallang.xlf+2 −2
- typo3/sysext/redirects/Resources/Private/Language/locallang_db.xlf+9 −0
- typo3/sysext/redirects/Resources/Private/Language/locallang_module_redirect.xlf+6 −0
- typo3/sysext/redirects/Resources/Private/Templates/Management/Overview.html4+9 −0
- typo3/sysext/redirects/ext_tables.sql+1 −0
Review log 4459
Show 2534 earlier messages
-
Georg Ringer uploaded patch set 1 04/05/22, 17:21
-
Georg Ringer commented on patch set 1 04/05/22, 17:21
This change is ready for review. -
core-ci voted on patch set 1 V -1 04/05/22, 17:32 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/25547
-
Georg Ringer uploaded patch set 2 04/05/22, 18:21
-
core-ci voted on patch set 2 V -1 04/05/22, 18:36 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/25550
-
Stefan Bürk commented on patch set 2 04/05/22, 19:11
Demand.php:232Do I miss something, or should this be `getCreationType()` (along with all callings/usages) ? -
Georg Ringer uploaded patch set 3 04/05/22, 19:21
-
Chris Müller commented on patch set 3 04/05/22, 19:29
Demand.php:239Maybe we can use a backed enum, so it is clear what 1 and 2 are meaning. Also, we have a better type safety than with an int. -
core-ci voted on patch set 3 V -1 04/05/22, 19:31 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/25555
-
Georg Ringer commented on patch set 4 04/06/22, 04:17
Published edit on patch set 3. -
core-ci voted on patch set 4 V +1 04/06/22, 04:25 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/25574
-
Oli Bartsch commented on patch set 4 CR -1 04/06/22, 07:49
Demand.php:48Missing whitespaceDemand.php:239ReplyI don't understand the reason for the "int" approach at all. The field is defined as checkbox (in TCA). A simple toggle between automatically and manually created. So why not just using a bool flag "$automaticallyCreated"?RedirectRepository.php:118Shouldn't we keep this information? Maybe change to "Used e.g. for filtering in the backend".Overview.html:276Seems to be unrelated and will furthermore lead to inconsistency with the other filters in belog and beusers. -
Georg Ringer commented on patch set 4 04/06/22, 08:17
Demand.php:239Replybecause it should be possible show the ones with 0 or the ones with 1 and to know if the filter is set or notRedirectRepository.php:118Replycan be added of course again but more correct is IMO what the method does not and not where it might be usedOverview.html:276Replyunrelated but makes the UI cleaner as it only shows the reset if needed -
Oli Bartsch commented on patch set 4 04/06/22, 08:53
Demand.php:239ReplyShouldn't this be done with "?bool $automaticallyCreated" instead? So null for not set ("Both options") and if set either false (manually) or true (automatically). Creating from request this would be sth like: if (($demand['automatically_created'] ?? '') === '') { $this->automaticallyCreated = null; } else { $this->automaticallyCreated = (bool)$demand['automatically_created']; } And for example this method would be: public function hasCreationConstraint(): bool { return $this->automaticallyCreated !== null; }RedirectRepository.php:118ReplyAckOverview.html:276ReplyI agree on the UI improvement, however this should be done in a separate patch for all filters in the backend to keep consistency. -
Georg Ringer commented on patch set 4 CR -2 04/06/22, 09:24
will update patch later -
Georg Ringer uploaded patch set 5 04/06/22, 11:06
-
Georg Ringer voted on patch set 5 CR 0 04/06/22, 11:06
-
core-ci voted on patch set 5 V +1 04/06/22, 11:15 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/25620
-
Georg Ringer uploaded patch set 6 04/06/22, 16:36
-
core-ci voted on patch set 6 V +1 04/06/22, 16:49 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/25675
-
Stefan Bürk commented on patch set 6 CR -1 04/06/22, 17:10
on it -
Stefan Bürk uploaded patch set 7 04/06/22, 17:50
-
core-ci voted on patch set 7 V +1 04/06/22, 18:02 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/25689
-
Stefan Bürk commented on patch set 7 V +1 CR +1 04/06/22, 19:35
Demand.php:48ReplyDoneDemand.php:232ReplyDoneDemand.php:239ReplyGeorg adjusted his patch. Now it is not a checkbox and it make more sense, I think.Overview.html:276ReplyDone -
Oli Bartsch commented on patch set 7 04/06/22, 20:06
RedirectCreationTypeUpdate.php:27Why do we need an upgrade wizard for a completely new field? IMO the SQL default "0" should be equal to "manually created". Otherwise, the SQL default "0" does not represent anything and does also not match the TCA default. The "All types" can also be selected in the modal while having the default be "0". We would just need some additional strict checks. -
Oli Bartsch voted on patch set 7 CR -1 04/06/22, 20:06
-
Oli Bartsch commented on patch set 7 04/06/22, 20:08
RedirectCreationTypeUpdate.php:27ReplyActually the "All types" option in the module does already use an empty string and not the "0". So we would just need some additional checks to get this straight. -
Georg Ringer uploaded patch set 8 04/07/22, 13:23
-
Georg Ringer commented on patch set 7 04/07/22, 13:24
RedirectCreationTypeUpdate.php:27Replywhat about setting the default value for the DB to 1? I like to avoid having 0 for all as this would then lead to more checks -
core-ci voted on patch set 8 V -1 04/07/22, 13:37 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/25750
-
Georg Ringer uploaded patch set 9 07/21/22, 19:14
-
core-ci voted on patch set 9 V -1 07/21/22, 19:28 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/29408
-
Simon Schaufelberger commented on patch set 9 07/21/22, 20:47
SlugService.php:206could we use a constant here so that we know what 2 means? -
Stefan Bürk commented on patch set 10 07/21/22, 21:05
Published edit on patch set 9.
-
core-ci voted on patch set 10 V +1 07/21/22, 21:12 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/29410
-
Guido Schmechel commented on patch set 10 07/21/22, 21:37
Does it make sense to think about a third type here, e.g. "external"? For example by an importer or the EXT:redirect_generator ;-) That would give more possibilities for filtering. -
Stefan Bürk commented on patch set 10 07/21/22, 21:43
Reply
EXT:redirect_generator can simply add a custom type per TCA configuration. No need to add "fictive" types by core which core does not need directly. Same goes for project internal use or making kind of "categorization" in projetcs. -
Stefan Bürk commented on patch set 10 07/21/22, 22:15
Reply
From Feature ReST file: ``` If desired, the available items of the field `creation_type` can be extended with additional type by adjusting TCA for this field. This simplifies the registration of additional types, which automatically are available in backend filtering. Possible use-cases are for example synced redirects or migrated from other / old sources sources. ``` However, added a comment there to provice some example for it ...Feature-97309-DifferentiateRedirectsBasedOnCreationType.rst:31Maybe we should add a example to showcase this and help the documentation team to further document this then later. Or maybe, we should directy add a section to the ext:redirects extension documentation ? -
Guido Schmechel commented on patch set 10 07/22/22, 10:36
Feature-97309-DifferentiateRedirectsBasedOnCreationType.rst:31ReplyGood point. I would suggest that we add a TCA example here in the RST. We usually do that in other RST files as well. And then later we can extend the redirects doc. Probably even copy & paste is enough. -
Guido Schmechel commented on patch set 10 07/24/22, 07:13
RedirectRepository.php:217Small hint: "creation_type" -
Chris Müller commented on patch set 10 07/24/22, 17:09
Feature-97309-DifferentiateRedirectsBasedOnCreationType.rst:31ReplyAs the redirects documentation is already available in the system extension itself this patch can enhance the documentation directly (which would be very nice) so there is no need to afterwards add a new patch to enhance the docs with this feature. -
Chris Müller uploaded patch set 11 07/26/22, 17:33
-
core-ci voted on patch set 11 V +1 07/26/22, 17:39 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/29560
-
Benni Mack commented on patch set 11 09/27/22, 13:41
anyone care to update this patch? -
Georg Ringer uploaded patch set 12 09/27/22, 16:54
-
Georg Ringer commented on patch set 12 09/27/22, 16:54
Feature-97309-DifferentiateRedirectsBasedOnCreationType.rst:31ReplyDoneRedirectCreationTypeUpdate.php:27ReplyDoneRedirectRepository.php:217ReplyDoneSlugService.php:206Replyas those will be extended anyway I would like to avoid it, also it is now 0 anyway -
core-ci voted on patch set 12 V -1 09/27/22, 17:03 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/31604
-
Georg Ringer commented on patch set 13 09/27/22, 17:28
Published edit on patch set 12. -
core-ci voted on patch set 13 V +1 09/27/22, 17:35 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/31611
-
Georg Ringer rebased onto patch set 14 10/01/22, 19:58
-
core-ci voted on patch set 14 V +1 10/01/22, 20:08 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/31845
-
Georg Ringer commented on patch set 14 10/02/22, 18:06
Demand.php:239ReplyDoneSlugService.php:206ReplyDone -
Chris Müller uploaded patch set 15 10/21/22, 09:48
-
core-ci voted on patch set 15 V +1 10/21/22, 09:58 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/32574
-
Kevin Appelt commented on patch set 15 V +1 CR +1 11/03/22, 19:00
Looks good and I already like the feature. -
Anja Leichsenring voted on patch set 15 V +1 CR +1 11/03/22, 19:38
-
Stefan Bürk voted on patch set 15 V +2 CR +2 11/03/22, 19:38
-
Stefan Bürk merged patch set 16 11/03/22, 19:38
-
Mathias Brodala commented on patch set 16 01/20/23, 09:43
Just my two cents: a varchar field would be better IMO for readable type names with a clearer origin e.g. by package prefix, etc (same reasoning as the change itself ;-)