Review main Merged

93290[FEATURE] Implement page creation wizard

Bastien Lutz CR +2 V +2 Nightmare +3175 −199 updated 03/27/26, 09:24

Commit message

This change introduces a new, guided "Page Creation Wizard"
designed to streamline the page creation process. This interface
replaces the traditional, technically complex workflow with
a modular and accessible step-by-step process.

The primary goals of the wizard are to ensure data integrity
by enforcing mandatory fields during creation, improve
accessibility, and provide  a modern, responsive user experience
that requires no deep TYPO3-specific expertise.

Review

  • Code review CR +2 Done
    • Andreas Nedbal +2
    • Benjamin Franzke +1
    • Benjamin Kott +1
  • Verified V +2 Done
    • Andreas Nedbal +2
    • Benjamin Franzke +1
    • Benjamin Kott +1
    • core-ci +1 CI

Issues 2

Files 70

Show 50 more files

Review log 4151

Show 1626 earlier messages
  1. Bastien Lutz uploaded patch set 1 03/20/26, 13:44

  2. Bastien Lutz uploaded patch set 2 03/20/26, 13:52

  3. core-ci voted on patch set 2 V -1 03/20/26, 14:05 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/98298

  4. Andreas Nedbal uploaded patch set 3 V -1 03/20/26, 14:13

  5. core-ci voted on patch set 3 V +1 03/20/26, 14:21 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/98300

  6. core-ci voted on patch set 1 V -1 03/20/26, 14:26 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/98296

  7. Andreas Nedbal updated the commit message in patch set 4 V +1 03/20/26, 14:39

  8. Andreas Nedbal uploaded patch set 5 03/20/26, 14:41

  9. core-ci voted on patch set 5 V +1 03/20/26, 14:51 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/98304

  10. core-ci voted on patch set 4 V +1 03/20/26, 15:14 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/98303

  11. Benjamin Kott uploaded patch set 6 V +1 03/23/26, 06:29

  12. Benjamin Kott rebased onto patch set 7 03/23/26, 06:38

  13. core-ci voted on patch set 6 V +1 03/23/26, 06:45 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/98413

  14. core-ci voted on patch set 7 V +1 03/23/26, 06:56 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/98417

  15. Benjamin Kott uploaded patch set 8 V +1 03/23/26, 07:10

  16. core-ci voted on patch set 8 V -1 03/23/26, 07:25 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/98419

  17. core-ci commented on patch set 8 03/23/26, 07:31 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/98419

  18. Benjamin Kott voted on patch set 8 CR +1 V +1 03/23/26, 07:32

  19. core-ci voted on patch set 8 V +1 03/23/26, 07:36 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/98419

  20. Benjamin Franzke commented on patch set 8 CR +1 V +1 03/23/26, 07:38

    TableListViewHelper.php:114

    Looks a bit odd, but needed for changes in typo3/sysext/backend/Classes/RecordList/DatabaseRecordList.php (We should rather move the `@typo3/backend/record-download-button.js` and `@typo3/backend/page-wizard/new-page-wizard-button.js` import into recordlist.js directly at some point)
  21. Andreas Nedbal voted on patch set 8 CR +2 V +2 03/23/26, 07:51

  22. Andreas Nedbal merged patch set 9 03/23/26, 07:51

  23. Oli Bartsch commented on patch set 9 03/23/26, 08:05

    Thanks for all the effort. I really like the direction. I left kind of detailed inline comments. I'd also like to understand how this architecture would support future workflows like "create site root", "create from preset", or "create from import". Could you describe how those would plug in? Please also add proper documentation to the classes and components. Reviewing this was / is really hard this way. Remarks using the wizard: - It's not clear to me that I can select a page and that the "position" selection nodes do change then. - Options to search in translations etc. are missing in the options dropdown - Entering a non matching search term in the dokytype step leads to an empty view instead of an information. This is especially problematic when one still click continue as he does not see, which doktype has been selected in the end - The wizard does currently not properly resolve required hidden fields, e.g. generator fields for pages.slug - Adding values from "on top" modals e.g. selecting a link, does not work. Also adding values manually is not kept - Navigating back somehow always removed the added values. Maybe I'm doing sth. wrong but I did not get it to work that values are kept. - there are cases when the page tree is not reloaded after creating pages (e.g. when deciding on "create another page" and quitting this creation then

    page-wizard-configuration.ts:19

    Could we make this positiv? Because you rename it on evaluation to `preventPositionAutoAdvance` anyways and afaik we use positiv flags.

    page-wizard.ts:63

    When is this null?

    page-wizard.ts:93

    Could we rename to sth. like `loadDynamicStepsAfterDoktype`?

    doktype-step.ts:140

    not surea bout this. the description originates from TCA and is render here without sanitization. While this comes from server-side, any extension can register a doktype with an arbitrary description in TCA select items, could be an XSS vector.

    doktype-step.ts:193

    ```suggestion private handleSearch(event: InputEvent): void { ```

    form-engine-step.ts:36 Unresolved

    because we disable shadow dom, this is not reliable. Let's add proper scoping and / or unique identifier here.

    form-engine-step.ts:50 Unresolved

    Looks like this handles only checkboxes and plain `input.value` assignments. Did you ensure this works with all FormEngine types, which might have complex DOM structures? Setting `.value` on these IMO either does nothing or produces broken state. Feels like kind of reimplementation that however doesn't account for Form Engine actual DOM structure.

    form-engine-step.ts:110 Unresolved

    This restores values via raw DOM manipulation before `FormEngine.reinitialize()`, but no "change" events are dispatched. FormEngine is kind of blind to the restored values. Maybe this one of the reasons for the problem with the missing values on going back in the wizard.

    position-step.ts:60

    There are a lot of loose comparisons in those components. Any reason for this?

    position-step.ts:79

    Could we please avoid inline styling

    dynamic-steps-loader.ts:16

    Please add some documentation tho this method.

    dynamic-steps-loader.ts:33

    Not sure about using Object.assign to spread raw server JSON onto a class instance. Since FormEngineStep has both data properties and methods on the same object, a server response containing a key like "isComplete" or "render" would silently overwrite the class method, breaking the step. This seems risky and is kind of uncontrolled property injection. I suggest explicit property assignment. also the "mode" parameter in WizardController has no proper validation but fails hard.

    page-creation-with-drag-and-drop.spec.ts:7

    The existing drag-and-drop tests were comprehensive (create page, verify, delete). They've now been replaced with a minimal test that only checks the modal opens, plus a @todo. The NewRecordTypeCest test is similarly reduced. This is a significant test coverage regression. The previous tests verified page creation, the new ones only check UI appearance. As a component with so much logic and functionality, please provide comprehensive test coverage again.

    workspaces-module.spec.ts:18

    ```suggestion await pageWizard.createDefaultPage(backend.modal, testPageTitle); ```

    PageWizardController.php:45

    Please add some information what this controller is doing.

    PageWizardController.php:61 Unresolved

    the repository applies workspace and language overlays based on context object. In a backend controllers, the established pattern is to use BackendUtility::getRecord() or BackendUtility::readPageAccess() which handle the backend context correctly. What is the reason for using the repository here? Same in getPageDetailAction

    PageWizardController.php:64

    If extension add custom form data provider for doktype resolving, this is not respected anymore.

    PageWizardController.php:82 Unresolved

    Does it make sense to call the compiler with this being `null`?

    PageWizardController.php:105

    This action, or basically all ajax actions here do not perform any permission check, AFAICS one can use this action to read page information of any page in the system. Please correct if I overlooked something.

    PageWizardController.php:122

    See comment in `getDoktypesAction`

    PageWizardController.php:136

    this accepts arbitrary field names from the query string and passes them to `getProcessedValue()`, which does zero permission checks. Any authenticated backend user can probe arbitrary fields.

    DatabaseRecordList.php:1022

    this seems to be invalid

    Configuration.php:20

    What is this used for? Please clarify via a class comment.

    Finisher.php:20

    What is this used for and how is it integrated? Please clarify via a class comment.

    Step.php:20

    Please document this class

    SubmissionResult.php:20

    Please document this class.

    SubmissionResult.php:23

    When can success be true while having errors?

    SubmissionResult.php:28

    Seems to be unused.

    SubmissionResult.php:33

    Seems to be unused.

    PageWizardProvider.php:31

    Why do we not use a PHP Attribute here?

    PageWizardProvider.php:34

    DataHandler is stateful and is designed to be instantiated fresh per operation.

    PageWizardProvider.php:41

    Isn't this more an identifier? I suggest to configure this in the an `AsWizard` attribute.

    PageWizardProvider.php:49 Unresolved

    Should this be localized?

    PageWizardProvider.php:80

    This is currently acknowledging it's a hack. Parsing this as a literal string key is extremely fragile and it depends on FormEngine's internal naming convention leaking through JS FormData serialization. This will break if FormEngine naming ever changes, and it allows arbitrary field names to be injected into the DataHandler without validation. This needs to be cleaned up before merging.

    PageWizardProvider.php:89

    Why is this called?

    PageWizardStepBuilder.php:40

    any reason why this class is not final while others are?

    PageWizardStepBuilder.php:59

    This does not work for fields being set `required` via TSconfig, right?

    PageWizardStepBuilder.php:60

    As mentioned in another comment, this should come from the schema not via direct call.

    PageWizardStepBuilder.php:75

    Should be localized.

    PageWizardStepBuilder.php:87 Unresolved

    I suggest to make this unique by adding an identifier next to the name.

    PageWizardStepBuilder.php:122

    The labels are already rendered by FormEngine in the corresponding step. Every field has a <label> element with the correct, translated, context-aware label (including TSconfig overrides). Re-resolving them from raw TCA here bypasses any label overrides that FormEngine may have applied. Could the summary step extract labels from the already-rendered FormEngine output instead of duplicating the resolution logic?

    WizardProviderFactory.php:29

    Naming things, but this should be `$identifier` I think.

    WizardProviderInterface.php:22

    Could we please add documentation to this interface. And this class misses declaring strict types.

    AjaxRoutes.php:518

    Could we please define allowed methods for all new endpoints

    Services.yaml:84

    I really would like to see this being registered via an attribute. This is the current approach for new functionality like this. Any reason why you did not yet use them?

    page.xlf:32

    ```suggestion <source>The pages have been successfully created. You will be redirected to the new created page.</source> ```

    NewRecord.fluid.html:41

    What does this do? Setting "pages" here seems to be even not correct.

    PageWizardStepBuilderTest.php:126

    I'm missing a test, which checks `$subject->getStepsForDokType('invalid', ...`

    PageWizardControllerTest.php:33

    Please always use functional tests for controllers.

    WizardControllerTest.php:33

    Please always use functional tests for controllers.

    SubmissionResultTest.php:26

    I really question the meaningfulness of these tests. Testing DTO i/o does IMO not make much sense.

    pages.php:681

    We actually did it this way two years ago but there were a lot of concerns. Anyway, I think it might still be the right place, but the new wizardSteps TCA key is not integrated into the TCA Schema system at all. There is no TcaMigration / TcaPreparation, so no schema validation. It's accessed via raw array access, bypassing all schema abstractions. Any typo in wizardSteps config will silently fail. This needs proper schema integration. Either a dedicated schema object for wizard steps, or at minimum validation during TCA compilation.

    Feature-109271-TCAConfigurationForDynamicWizardSteps.rst:6

    Honest question: What is dynamic when we need to define every field, which should be rendered in the wizard?

    Feature-109271-TCAConfigurationForDynamicWizardSteps.rst:17

    I suggest `page type` or when being technical `doktype`. You even use `page type` below.

    Feature-109271-TCAConfigurationForDynamicWizardSteps.rst:19

    We should not introduce TCA config dedicated to a specific table. We might note that it's just working for pages.

    Feature-109271-TCAConfigurationForDynamicWizardSteps.rst:38

    using new config to define fields to render in combination with the way, form engine gets instantiated, bypasses all form engine functionality to calculate required hidden fields etc. - see my comment about missing generator fields.
  24. Oli Bartsch commented on patch set 9 03/23/26, 08:21

    doktype-step.ts:140 Reply

    Done

    position-step.ts:79 Reply

    Done
  25. Jasmina Ließmann commented on patch set 9 03/23/26, 09:24

    The option to create multiple pages at once has been removed with this patch. This was particularly helpful when setting up large pages. Are there plans to bring this back in some form? The "Create another page" button does not do justice to the previous behavior, as you always have to click through 4 wizard pages before creating the next page.
  26. Tobias Wojtylak commented on patch set 9 03/23/26, 11:57

    doktype-step.ts:193 Reply

    DatabaseRecordList.php:1022 Reply

    SubmissionResult.php:23 Reply

    The constructor is private, so you can only create instances through: createSuccessResult() → always success: true and no errors createErrorResult() → always success: false and errors present

    SubmissionResult.php:28 Reply

    SubmissionResult.php:33 Reply

    PageWizardProvider.php:31 Reply

    Which PHP Attribute doe you mean?

    page.xlf:32 Reply

    NewRecord.fluid.html:41 Reply

    This is currently used in the NewRecordTypeCest. The value is set here: https://github.com/TYPO3/typo3/blob/24e5e394d3ba9ef80e85a6763c69f871fd40aacf/typo3/sysext/backend/Classes/Controller/NewRecordController.php#L364 , meaning it ends up being either “inside” or “after”.
  1. Tobias Wojtylak commented on patch set 9 03/23/26, 13:27

    page-wizard-configuration.ts:19 Reply

    position-step.ts:60 Reply

    Not really. The implementation is based on the localization wizard and copied from there. Done via https://review.typo3.org/c/Packages/TYPO3.CMS/+/93314
  2. Oli Bartsch commented on patch set 9 03/23/26, 13:43

    SubmissionResult.php:23 Reply

    OK, let's rephrase: Why do we need this flag? Can we not just only have `$errors`? Based on my findings and your explanation, I see no reason for this flag.

    PageWizardProvider.php:31 Reply

    A new attribute, e.g. `AsWizardProvider`. ```suggestion #[AsWizardProvider( identifier: 'page_wizard' )] class PageWizardProvider implements WizardProviderInterface ```
  3. Oli Bartsch commented on patch set 9 03/23/26, 13:48

    page-wizard.ts:63 Reply

    The issue isn't configuration, that's fine and expected. It's the `this?` part. ` this` is never null inside a class method, so `this?.configuration` is identical to this.configuration. The optional chaining on this is misleading as it suggests the instance itself could be null.
  4. Tobias Wojtylak commented on patch set 9 03/23/26, 16:47

    PageWizardControllerTest.php:33 Reply

    Done via 93320: [TASK] Replace unit tests with functional tests for Wizard Controller | https://review.typo3.org/c/Packages/TYPO3.CMS/+/93320

    WizardControllerTest.php:33 Reply

    Done

    SubmissionResultTest.php:26 Reply

    I disagree: The DTO it encodes rules and output format.
  5. Tobias Wojtylak commented on patch set 9 03/23/26, 16:55

    page-wizard.ts:63 Reply

    ok the optional chaining might be redundant: Done via 93314: [BUGFIX] fix page wizard typos, naming, style, unused functions | https://review.typo3.org/c/Packages/TYPO3.CMS/+/93314
  6. Tobias Wojtylak commented on patch set 9 03/24/26, 07:23

    page-wizard-configuration.ts:19 Reply

    position-step.ts:60 Reply

  7. Bastien Lutz commented on patch set 9 03/24/26, 09:11

    PageWizardProvider.php:31 Reply

    PageWizardProvider.php:34 Reply

    PageWizardProvider.php:41 Reply

    PageWizardProvider.php:89 Reply

    WizardProviderFactory.php:29 Reply

    WizardProviderInterface.php:22 Reply

  8. Tobias Wojtylak commented on patch set 9 03/24/26, 11:20

    page-creation-with-drag-and-drop.spec.ts:7 Reply

    Done

    workspaces-module.spec.ts:18 Reply

  9. Bastien Lutz commented on patch set 9 03/24/26, 14:08

    PageWizardStepBuilder.php:40 Reply

    PageWizardStepBuilder.php:60 Reply

    PageWizardStepBuilder.php:75 Reply

    PageWizardStepBuilderTest.php:126 Reply

    Does already exist see: getStepsForDokTypeThrowsExceptionIfDokTypeDoesNotExist()

    Feature-109271-TCAConfigurationForDynamicWizardSteps.rst:6 Reply

    Feature-109271-TCAConfigurationForDynamicWizardSteps.rst:17 Reply

    Feature-109271-TCAConfigurationForDynamicWizardSteps.rst:19 Reply

  10. Tobias Wojtylak commented on patch set 9 03/24/26, 14:41

  11. Bastien Lutz commented on patch set 9 03/24/26, 14:47

    PageWizardStepBuilder.php:59 Reply

    That would be correct, but when looking at FormEngineUtility::allowOverrideMatrix it becomes clear, that setting a field to required using TSconfig is not possible. Therefor i'd ignore this for instance.
  12. Tobias Wojtylak commented on patch set 9 03/24/26, 15:14

    dynamic-steps-loader.ts:16 Reply

    Configuration.php:20 Reply

    SubmissionResult.php:20 Reply

  13. Tobias Wojtylak commented on patch set 9 03/24/26, 15:20

    PageWizardController.php:45 Reply

  14. Tobias Wojtylak commented on patch set 9 03/24/26, 16:14

    dynamic-steps-loader.ts:33 Reply

  15. Florian Keitgen commented on patch set 9 03/25/26, 07:53

    Reply

    At the moment, bringing this back is not planned for the current v14 implementation of the wizard. The main goal of the new workflow is to make sure all required page fields are properly taken into account and filled in. Because of that, the previous bulk-creation approach no longer fits well with the logic behind the updated wizard. We definitely understand the convenience the old behavior offered, especially when creating larger page trees, but for now the focus is on consistency and completeness in the page creation process.
  16. Tobias Wojtylak commented on patch set 9 03/25/26, 08:01

    PageWizardController.php:64 Reply

    This is a general issue with the OnTheFly pattern. The providers must be defined explicitly here. In coordination, we established this pattern in https://review.typo3.org/c/Packages/TYPO3.CMS/+/93139. For the moment, we think the solution is fine as it is.

    SubmissionResult.php:23 Reply

    We discussed the topic within the team and decided to leave it as it is. This pattern is already used multiple times in the core.
  17. Oli Bartsch commented on patch set 9 03/25/26, 11:05

    PageWizardController.php:64 Reply Unresolved

    Oke, in this case, we have to document this limitation in the changlog.

    SubmissionResult.php:23 Reply

    Referring to existing patterns in the core does not explain why this approach is appropriate in this specific case. If there is a concrete benefit or requirement that necessitates this flag, it would be helpful to outline it. Otherwise, repeating an existing pattern alone is not a strong justification.
  18. Bastien Lutz commented on patch set 9 03/25/26, 11:38

    PageWizardProvider.php:80 Reply

  19. Bastien Lutz commented on patch set 9 03/25/26, 12:23

    PageWizardStepBuilder.php:122 Reply

  20. Simon Praetorius commented on patch set 9 03/25/26, 13:54

    Reply Unresolved

    This should be mentioned in the changelog then. I can‘t find that information in the commit message or the associated RST files. Or did I miss it?
  21. Andreas Nedbal commented on patch set 9 03/25/26, 15:11

    PageWizardController.php:105 Reply

    PageWizardController.php:122 Reply

    PageWizardController.php:136 Reply

  22. Bastien Lutz commented on patch set 9 03/26/26, 13:32

    Feature-109271-TCAConfigurationForDynamicWizardSteps.rst:38 Reply Unresolved

    What required hidden fields are missing here?
  23. Tobias Wojtylak commented on patch set 9 03/26/26, 15:46

    SubmissionResult.php:23 Reply

  24. Jasmina Ließmann wrote 03/26/26, 15:57

    Removed cc Jasmina Ließmann.
  25. Tobias Wojtylak commented on patch set 9 03/27/26, 09:24

    Reply Unresolved

    Thanks a lot for your detailed review. Regarding `Entering a non matching search term in the dokytype step leads to an empty view instead of an information` there is a PR which tackles this issue: https://review.typo3.org/c/Packages/TYPO3.CMS/+/93370 Regarding `here are cases when the page tree is not reloaded after creating pages (e.g. when deciding on "create another page" and quitting this creation then` this is fixed via https://review.typo3.org/c/Packages/TYPO3.CMS/+/93394 Regarding `Options to search in translations etc. are missing in the options dropdown` This option does not exist in the PageLinkBrowser or comparable places. If we want to introduce it, it should be discussed separately and implemented consistently across all relevant components.