Review main Merged

80010[TASK] Use later DataHandler hook in `DataHandlerSlugUpdateHook`

Stefan Bürk CR +2 V +2 Easy +4 −4 updated 07/19/23, 22:33

Commit message

Handling the pages slug changed event has been implemented with
a dedicated hook handling class, consuming two DataHandler hooks
to prepare and handle the redirect creation and slug update for
subpages. Auto redirect creation and subpage slug updating are
controlled by site setting configuration options.

The chosen second hook `processDatamap_postProcessFieldArray()`
is executed before the record is persisted into the database.

This change switches to `processDatamap_afterDatabaseOperations()`
as the second hook, so handling code can expect to have the
changes persisted to the database already. For example, this
would allow to use the slug generator in the `updateSlug()`
method in a dedicated change as possible solution for #96928.

Review

  • Code review CR +2 Done
    • Stefan Bürk +2
    • Christian Kuhn +1
    • Benni Mack +1
  • Verified V +2 Done
    • Stefan Bürk +2
    • Christian Kuhn +1
    • Benni Mack +1
    • core-ci +1 CI

Issues 2

Files 1

Review log 1217

  1. Stefan Bürk uploaded patch set 1 07/12/23, 10:50

  2. Stefan Bürk updated the commit message in patch set 2 07/12/23, 10:54

  3. core-ci voted on patch set 1 V +1 07/12/23, 10:59 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/44077

  4. core-ci voted on patch set 2 V +1 07/12/23, 11:02 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/44078

  5. Stefan Bürk rebased onto patch set 3 V +1 07/12/23, 23:10

  6. core-ci voted on patch set 3 V +1 07/12/23, 23:24 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/44099

  7. Nikita Hovratov updated the commit message in patch set 4 V +1 07/15/23, 20:55

  8. Stefan Bürk voted on patch set 4 CR -1 07/15/23, 20:57

  9. core-ci voted on patch set 4 V +1 07/15/23, 21:03 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/44180

  10. Stefan Bürk commented on patch set 4 07/15/23, 21:03

    DataHandlerSlugUpdateHook.php:89

    I guess we still need this - will re-test this, therefor the -1 from my side.
  11. Stefan Bürk uploaded patch set 5 CR -1 V +1 07/18/23, 08:18

  12. Stefan Bürk commented on patch set 5 07/18/23, 08:19

    DataHandlerSlugUpdateHook.php:89 Reply

    Yep. Readded it with a slightly adjusted comment.
  13. core-ci voted on patch set 5 V +1 07/18/23, 08:26 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/44233

  14. Christian Kuhn voted on patch set 5 V +1 CR +1 07/18/23, 12:05

  15. Benni Mack voted on patch set 5 V +1 CR +1 07/19/23, 21:30

  16. Stefan Bürk voted on patch set 5 V +2 CR +2 07/19/23, 22:25

  17. Stefan Bürk merged patch set 6 07/19/23, 22:33