Merge conflict Gerrit cannot merge this change. It needs a rebase onto main.

Review main Work in progress Orphaned

83208[WIP][FEATURE] Introduce Creation Wizards

Oli Bartsch CR 0 V -1 Nightmare +3406 −50 updated 05/14/25, 08:01

Commit message

This commit introduces Creation Wizard, a new way of creating content
into TYPO3. The approach uses a wizard-based interface to guide backend
users when creating new content.

In this implementation, guided creation is offered for pages in the page
tree, either by dragging an icon into the tree, or by clicking the
Creation Wizard button in the page tree toolbar.

TYPO3 will ship two creation wizards from the beginning:

* doktype-based creation
  A backend user will be capable of creating a page based on its doktype
* Site root
  Permitted backend users may create a new site root at any location in
  the page tree

Futher creation wizards may follow in the future.

Please note: all API is considered internal until everything is
stabilized and set in stone.

TODO:
* Permission checks
* Feature ReST file

Test this change

Run a command in your clone of the TYPO3 Core. Then try what the change does and vote on Verified in Gerrit. How to review a patch

Check out patch set 81
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/08/83208/81 && git checkout FETCH_HEAD
Cherry-pick onto main
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/08/83208/81 && git cherry-pick FETCH_HEAD

Review

  • Code review CR 0 Needs a vote
  • Verified V -1 Blocked
    • core-ci -1 CI

Issues 1

Files 75

Show 55 more files

Review log 95125

Show 80100 earlier messages
  1. Oli Bartsch uploaded patch set 1 03/05/24, 09:03

  2. Oli Bartsch uploaded patch set 2 03/05/24, 20:36

  3. Oli Bartsch uploaded patch set 3 03/06/24, 13:35

  4. Oli Bartsch uploaded patch set 4 03/06/24, 18:46

  5. Oli Bartsch uploaded patch set 5 03/07/24, 09:27

  6. Oli Bartsch uploaded patch set 6 03/07/24, 20:23

  7. Oli Bartsch uploaded patch set 7 03/07/24, 21:02

  8. Andreas Kienast commented on patch set 7 CR -1 03/11/24, 10:04

    Taking over from here
  9. Andreas Kienast uploaded patch set 8 CR -1 03/11/24, 15:37

  10. Oli Bartsch uploaded patch set 9 03/12/24, 20:43

  11. Andreas Kienast uploaded patch set 10 03/13/24, 13:18

  12. Andreas Kienast uploaded patch set 11 03/14/24, 08:34

  13. Andreas Kienast uploaded patch set 12 03/14/24, 13:55

  14. Andreas Kienast uploaded patch set 13 03/14/24, 16:00

  15. Andreas Kienast uploaded patch set 14 03/21/24, 08:43

  16. Andreas Kienast uploaded patch set 15 03/21/24, 08:52

  17. Oli Bartsch uploaded patch set 16 03/21/24, 10:46

  18. Andreas Kienast uploaded patch set 17 03/21/24, 10:46

  19. Andreas Kienast uploaded patch set 18 03/21/24, 12:10

  20. Oli Bartsch uploaded patch set 19 03/27/24, 13:12

  21. Oli Bartsch uploaded patch set 20 03/27/24, 18:15

  22. Oli Bartsch uploaded patch set 21 03/28/24, 15:23

  23. Andreas Kienast uploaded patch set 22 04/03/24, 11:09

  24. Andreas Kienast uploaded patch set 23 04/11/24, 11:33

  25. Oli Bartsch uploaded patch set 24 04/17/24, 06:57

  26. Frank Nägler commented on patch set 24 04/17/24, 12:02

    I have discussed this PR today with Andy. I have now checked out the current state. I know it is still WIP or a POC. But here are my remarks: - The wizards need a back button, e.g., I clicked on "standard page" and will change it. This is impossible at the moment - The tree in the wizard shows a strange tree, which may be a known issue!? - Adding the slug as a required field in another step feels strange. Why not be on the same page? And maybe create the slug automatically in the first run? But one really important thing: The icons above the tree. Please bring the icons back and allow the drag and drop as before. If the creation needs information like the URL for the external link type, step into the wizard and ask for that. Removing the drag&drop functionality is a deterioration regarding user experience and the daily workload of editors. This is against our goal to make the editor's lives easier. Please let us talk about it if you have questions.
  27. Oli Bartsch uploaded patch set 25 04/17/24, 13:50

  28. Andreas Kienast uploaded patch set 26 04/18/24, 08:41

  29. Oli Bartsch uploaded patch set 27 04/18/24, 09:50

  30. Oli Bartsch uploaded patch set 28 04/24/24, 10:48

  31. Andreas Kienast uploaded patch set 29 05/06/24, 13:40

  32. Andreas Kienast uploaded patch set 30 05/07/24, 13:44

  33. Andreas Kienast uploaded patch set 31 05/07/24, 14:40

  34. Andreas Kienast uploaded patch set 32 05/16/24, 09:53

  35. Andreas Kienast uploaded patch set 33 05/17/24, 12:22

  36. Andreas Kienast uploaded patch set 34 05/21/24, 07:09

  37. Andreas Kienast uploaded patch set 35 05/21/24, 08:32

  38. Andreas Kienast uploaded patch set 36 05/21/24, 13:16

  39. Andreas Kienast uploaded patch set 37 05/21/24, 13:28

  40. Andreas Kienast uploaded patch set 38 05/21/24, 14:19

  41. Andreas Kienast uploaded patch set 39 07/11/24, 09:03

  42. Andreas Kienast uploaded patch set 40 07/11/24, 14:32

  43. Andreas Kienast uploaded patch set 41 07/15/24, 13:38

  44. Andreas Kienast uploaded patch set 42 07/16/24, 11:25

  45. Andreas Kienast uploaded patch set 43 07/16/24, 13:38

  46. Andreas Kienast uploaded patch set 44 07/16/24, 14:12

  47. Andreas Kienast uploaded patch set 45 07/17/24, 13:36

  48. Andreas Kienast uploaded patch set 46 07/18/24, 14:09

  49. Andreas Kienast uploaded patch set 47 07/18/24, 14:28

  50. Andreas Kienast uploaded patch set 48 07/19/24, 05:25

  51. Andreas Kienast uploaded patch set 49 07/24/24, 14:30

  52. Andreas Kienast uploaded patch set 50 07/24/24, 14:42

  53. Andreas Kienast uploaded patch set 51 07/24/24, 14:47

  54. Oli Bartsch wrote 07/25/24, 07:15

    Unset private
  55. Andreas Kienast uploaded patch set 52 07/25/24, 08:32

  56. core-ci voted on patch set 52 V +1 07/25/24, 08:39 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/62156

  57. Andreas Kienast uploaded patch set 53 V +1 07/26/24, 05:42

  58. core-ci voted on patch set 53 V +1 07/26/24, 05:47 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/62246

  59. Andreas Kienast uploaded patch set 54 V +1 07/26/24, 14:22

  60. core-ci voted on patch set 54 V -1 07/26/24, 14:30 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/62273

  61. Andreas Kienast uploaded patch set 55 V -1 07/29/24, 08:39

  62. core-ci voted on patch set 55 V +1 07/29/24, 08:47 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/62365

  63. Andreas Kienast uploaded patch set 56 V +1 07/29/24, 10:01

  64. core-ci voted on patch set 56 V +1 07/29/24, 10:06 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/62366

  65. Andreas Kienast uploaded patch set 57 V +1 07/29/24, 14:28

  66. core-ci voted on patch set 57 V +1 07/29/24, 14:33 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/62372

  67. Benjamin Franzke commented on patch set 57 07/29/24, 15:47

    creation-wizard.ts:28

    Are you sure this is `string, string`? The PHP code for CreationWizardContext reads like the value could be anything. Better have a type like `type CreationWizardContext = Record<string, unknown>` if we are uncertain what this actually is (as we do not parse the data, but pass-it-through via AjaxRequest.post, we don't need to be specific anyway)

    creation-wizard.ts:28

    I kinda dislike that this API is triggered from the PHP side via `JavaScriptInstruction::invoke()` instead of managing the modal and the finalization by the triggering javascript-code. Not a blocker though, but I still wanted to mention this, as `Modal.dimiss()` usage is actually a pointer that code relies on global state. (what would this code for example do, if the modal has been closed in the meantime)
  68. Andreas Kienast uploaded patch set 58 V +1 07/30/24, 07:09

  69. core-ci voted on patch set 58 V +1 07/30/24, 07:14 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/62416

  70. Andreas Kienast uploaded patch set 59 V +1 07/31/24, 14:25

  71. core-ci voted on patch set 59 V -1 07/31/24, 14:30 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/62557

  72. Andreas Kienast uploaded patch set 60 V -1 08/01/24, 07:10

  73. core-ci voted on patch set 60 V -1 08/01/24, 07:17 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/62581

  74. Andreas Kienast uploaded patch set 61 V -1 08/01/24, 07:34

  75. Andreas Kienast uploaded patch set 62 08/01/24, 07:39

  76. core-ci voted on patch set 61 V -1 08/01/24, 07:41 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/62582

  77. core-ci voted on patch set 62 V +1 08/01/24, 07:45 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/62584

  78. Andreas Kienast uploaded patch set 63 V +1 08/01/24, 18:18

  79. core-ci voted on patch set 63 V +1 08/01/24, 18:24 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/62603

  80. Annett Jähnichen commented on patch set 63 08/01/24, 20:01

    Andi we have to talk 😊
  81. Jemal Khachidze wrote 08/01/24, 20:02

    Removed cc Jemal Khachidze.
  82. Jemal Khachidze wrote 08/01/24, 20:02

    Removed cc Jemal Khachidze.
  83. Edwin Krivoseev wrote 08/01/24, 20:03

    Removed reviewer Edwin Krivoseev.
  84. Andreas Kienast uploaded patch set 64 V +1 08/01/24, 20:48

  85. core-ci voted on patch set 64 V -1 08/01/24, 21:12 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/62657

  86. Andreas Kienast marked it work in progress 08/02/24, 09:17

  87. Oli Bartsch uploaded patch set 65 V -1 08/03/24, 07:18

  88. core-ci voted on patch set 65 V -1 08/03/24, 07:23 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/62786

  89. Andreas Kienast uploaded patch set 66 V -1 08/16/24, 12:50

  90. core-ci voted on patch set 66 V -1 08/16/24, 12:58 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/63577

  91. Andreas Kienast uploaded patch set 67 V -1 08/16/24, 13:02

  92. core-ci voted on patch set 67 V +1 08/16/24, 13:09 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/63579

  93. Andreas Kienast uploaded patch set 68 V +1 08/19/24, 12:51

  94. Andreas Kienast uploaded patch set 69 08/19/24, 12:54

  95. core-ci voted on patch set 68 V +1 08/19/24, 12:59 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/63769

  96. core-ci voted on patch set 69 V +1 08/19/24, 13:01 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/63770

  97. Andreas Kienast uploaded patch set 70 V +1 08/20/24, 06:00

  98. core-ci voted on patch set 70 V -1 08/20/24, 06:07 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/63802

  99. Andreas Kienast uploaded patch set 71 V -1 08/20/24, 06:09

  100. core-ci voted on patch set 71 V +1 08/20/24, 06:17 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/63803

  1. Andreas Kienast uploaded patch set 72 V +1 08/27/24, 12:32

  2. core-ci voted on patch set 72 V +1 08/27/24, 12:37 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/64306

  3. Oliver Hader commented on patch set 72 09/04/24, 15:04

    Unresolved

    That looks like an enormous amount of work. And I'm not completely done yet with the review. By just looking at the visible functionality in the backend, it already feels really good. However, I think that some classes/interfaces still can be refactored, reduced or even removed - e.g. `ContextManager`, `ViewDescriber` or `FinalizerResult`.

    new-record-wizard.ts:534

    Please describe the difference between `location` and `inline` and when it's useful to use `inline`.

    page-tree-element.ts:86

    I think the event should be named accordingly, e.g. `typo3:pagetree:openCreationWizard`

    tree-toolbar.ts:97

    Would it be possible to use JSON instead of form-data here? e.g. `creationWizardContext: {table: 'pages', selectedWizard: ..., recordType: 1}` or just `context: {table: ..., ...}` (`creatingWizardContext` → `context`)

    ContextManager.php:28

    Naming-wise it seems to be more like a `Utility` or `Service`. It also might be a `CreationWizardContextTrait`...

    ContextManager.php:34

    Might be a static factory method, e.g. `CreationWizardContext::fromRequest()`

    ContextManager.php:36

    In general: We should avoid to continue merging GET and POST request params. I guess in this case, it would be focussing on parsed-body and method POST (or at least `!== 'GET'`)

    ContextManager.php:41

    It seems, that POST data was already sent with that prefix, e.g. `&creationWizardContext[table]=pages`...

    ContextManager.php:52

    Method might be part of the context, e.g. `CreationWizardContext->withData($data)`

    ContextManager.php:59

    I feel like those parameters should be HMACed in addition. Currently, only the `ajax_creation_wizard` is covered by the form-protection-token. Otherwise, it would be possible to trigger any available wizard (which then falls back to good permission checks at these wizard implementations).

    CreationWizardContext.php:33

    I think, the request should not be part of the `CreationWizardContext` model

    CreationWizardContext.php:81

    Probably should be `$level + 1`... However, I feel this might be JSON (I still have to check whether the data is just passed through the form, or whether it is accessed and modified by the JavaScript components)

    CreationWizardFinalizerInterface.php:25

    `FinalizerResult` seems to be too strict - it also might be reloading the page-tree or navigating to a specific component in the client (JavaScript-wise).

    RecordTypeCreationWizard.php:45

    I'd be in favor of removing these shortcuts... `$backendUser->check()` also uses the `isAdmin()` check internally - at a central location.
  4. Annett Jähnichen commented on patch set 72 09/05/24, 07:00

    Reply

    I spoke to Andi directly at the Coding Night at the TYPO3 Developer Days 2024 and shared the feedback from a small UX Team UserTest session with him.
  5. Andreas Kienast uploaded patch set 73 V +1 09/10/24, 09:48

  6. core-ci voted on patch set 73 V -1 09/10/24, 09:57 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/65204

  7. Andreas Kienast commented on patch set 73 09/10/24, 10:09

    new-record-wizard.ts:534 Reply

    Acknowledged

    page-tree-element.ts:86 Reply

    Acknowledged

    tree-toolbar.ts:97 Reply

    Technically yes, it's a lazy shortcut for providing this to `URLSearchParams`, its API doesn't allowing providing nested JSON objects. We can provide JSON on our own, but have to take care feeding nested objects properly to `URLSearchParams`.

    ContextManager.php:34 Reply

    Acknowledged

    ContextManager.php:36 Reply

    As discussed: the reason is that we have steps that are GET-based (e.g. the doktype selection).

    ContextManager.php:41 Reply

    I have to check again where this hack is required

    ContextManager.php:52 Reply

    Acknowledged

    ContextManager.php:59 Reply

    For full support, this requires to pre-build the arguments (payload and hmac) via PHP and pass it somehow(TM) into JS context. Tricky...

    CreationWizardContext.php:33 Reply Unresolved

    This is a shortcut as this avoids passing the request object to `CreationWizardStepInterface::render()`. However, I have no strong opinion on this.
  8. Andreas Kienast uploaded patch set 74 V -1 09/11/24, 07:16

  9. core-ci voted on patch set 74 V -1 09/11/24, 07:23 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/65381

  10. Andreas Kienast uploaded patch set 75 V -1 09/11/24, 09:25

  11. Andreas Kienast uploaded patch set 76 09/11/24, 09:37

  12. core-ci voted on patch set 75 V +1 09/11/24, 09:38 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/65400

  13. core-ci voted on patch set 76 V -1 09/11/24, 09:48 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/65403

  14. Andreas Kienast uploaded patch set 77 V -1 09/11/24, 09:53

  15. core-ci voted on patch set 77 V +1 09/11/24, 10:04 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/65410

  16. Oliver Hader commented on patch set 77 09/11/24, 14:18

    creation-wizard.ts:28 Reply

    Done

    tree-toolbar.ts:97 Reply

    Done

    ContextManager.php:28 Reply

    Done

    ContextManager.php:36 Reply

    Done

    ContextManager.php:41 Reply

    ... FormEngine ...

    ContextManager.php:59 Reply

    Done
  17. Oliver Hader uploaded patch set 78 V +1 09/11/24, 14:41

  18. core-ci voted on patch set 78 V -1 09/11/24, 14:48 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/65467

  19. Oli Bartsch uploaded patch set 79 V -1 10/17/24, 07:49

  20. core-ci voted on patch set 79 V -1 10/17/24, 07:58 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/67908

  21. Oli Bartsch uploaded patch set 80 V -1 10/20/24, 08:41

  22. core-ci voted on patch set 80 V -1 10/20/24, 08:56 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/68256

  23. Oliver Hader commented on patch set 80 01/07/25, 07:12

    CreationWizardContext.php:81 Reply

    Done

    CreationWizardFinalizerInterface.php:25 Reply

    Done

    RecordTypeCreationWizard.php:45 Reply

    Done
  24. Andreas Kienast updated the commit message in patch set 81 V -1 05/14/25, 07:48

  25. core-ci voted on patch set 81 V -1 05/14/25, 08:01 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/78897