Merge conflict Gerrit cannot merge this change. It needs a rebase onto main.
96746[FEATURE] Offer stored forms in new content element wizard
Commit message
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 7
-
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/46/96746/7 && git checkout FETCH_HEAD - Cherry-pick onto main
-
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/46/96746/7 && git cherry-pick FETCH_HEAD
Review
-
Code review CR 0 Needs a vote
-
Verified V 0 Needs a vote
- core-ci +1 CI
Issues 1
Files 17
- typo3/sysext/core/Documentation/Changelog/15.0/Feature-111094-DisplayStoredFormsInTheNewContentElementWizard.rstnew+90 −0
- typo3/sysext/form/Classes/Domain/DTO/FormData.php+13 −1
- typo3/sysext/form/Classes/Domain/Model/FormDefinition.php+1 −1
- typo3/sysext/form/Classes/EventListener/ModifyNewContentElementWizardItemsEventListener.php10new+120 −0
- typo3/sysext/form/Configuration/Form/Base/FormElements/Form.yaml+6 −0
- typo3/sysext/form/Documentation/I/Config/proto/form/formEditor/editors/250.rst.txtnew+35 −0
- typo3/sysext/form/Documentation/I/Config/proto/form/Index.rst+3 −0
- typo3/sysext/form/Documentation/QuickStartForIntegrators/Index.rst+20 −0
- typo3/sysext/form/Resources/Private/Language/Database.xlf+6 −0
- typo3/sysext/form/Tests/Functional/Domain/Factory/ArrayFormFactoryTest.php+20 −0
- typo3/sysext/form/Tests/Functional/EventListener/Fixtures/form_definition.csvnew+3 −0
- typo3/sysext/form/Tests/Functional/EventListener/Fixtures/pages.csvnew+39 −0
- typo3/sysext/form/Tests/Functional/EventListener/ModifyNewContentElementWizardItemsEventListenerTest.php2new+217 −0
- typo3/sysext/form/Tests/Functional/Fixtures/Extensions/form_storage_tests/Resources/Private/Forms/UnregisteredIconForm.form.yamlnew+5 −0
- typo3/sysext/form/Tests/Functional/Fixtures/Extensions/form_storage_tests/Resources/Private/Forms/WizardForm.form.yamlnew+6 −0
- typo3/sysext/form/Tests/Functional/Storage/ExtensionStorageAdapterFunctionalTest.php+17 −3
- typo3/sysext/form/Tests/Unit/Domain/DTO/FormDataTest.phpnew+59 −0
Review log 1724
-
Josua Vogel uploaded patch set 1 10/16/26, 05:48
-
core-ci voted on patch set 1 V +1 10/16/26, 05:56 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/111313
-
Josua Vogel commented on patch set 1 10/28/26, 10:49
This change is ready for review. -
Soren Malling voted on patch set 1 V +1 10/29/26, 06:40
-
Oli Bartsch commented on patch set 1 10/29/26, 08:29
FormMetadata.php:140`with()` takes `description`, `iconIdentifier` and `hideInNewContentElementWizard` from `$this` and ignores `$changes`, unlike the other fields. Please use `$changes['description'] ?? $this->description` and the same for the others.ModifyNewContentElementWizardItemsEventListener.php:37The generic form item is found via the hard-coded key `<group>_form_formframework`. If the element is moved to another group or redefined in Page TSconfig, the listener returns early and the feature silently does nothing. Suggest to locate the item by `defaultValues.CType === 'form_formframework'`, like `removeWizardsByBackendLayoutColPosRestriction` does, and insert after the key you find.ModifyNewContentElementWizardItemsEventListener.php:38Only the extension and database storages are queried, while `listForms()` iterates `getAllAdapters()`. Forms from other adapters therefore show up in the FlexForm select but not in the wizard. Suggest to iterate all adapters or document the restriction.ModifyNewContentElementWizardItemsEventListener.php:39`DatabaseStorageAdapter::findAll` never sets `iconIdentifier`, so the storage-type check never matters, and a form moved to the database silently loses its icon. Either drop `iconIdentifier` from this change (and remove the constant) or streamline the support.ModifyNewContentElementWizardItemsEventListener.php:52I think this is the wrong switch. AFAICS there is no way to disable just the new feature. You would need to either adjust every form or disable form element in general. Suggest to add Page TsConfig here. Also note that people might already define such specific form elements already on their own. So this would now duplicate them. I think this should at least be mentioned in the rst.ModifyNewContentElementWizardItemsEventListener.php:116suggest to use a simple string comparison as long as we have only one type.AbstractFileStorageAdapter.php:119This reads the first line only. So a multi-line YAML `description` ends up empty or truncated without any error. Please document that it must be a single-line value, or accept the limitation explicitly.ModifyNewContentElementWizardItemsEventListenerTest.php:146The test calls the listener directly as admin, so a broken `#[AsEventListener]` registration or a permission regression would go unnoticed. Please dispatch via `EventDispatcherInterface` and add cases for `be_users` uid 2 (no database forms) and uid 3. -
Josua Vogel uploaded patch set 2
V +111/09/26, 12:48 -
core-ci voted on patch set 2 V +1 11/09/26, 13:01 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/113668
-
Josua Vogel uploaded patch set 3
V +111/09/26, 13:08 -
core-ci voted on patch set 3 V +1 11/09/26, 13:24 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/113682
-
Josua Vogel uploaded patch set 4
V +111/09/26, 13:51 -
Josua Vogel commented on patch set 4 11/09/26, 13:54
FormMetadata.php:140ReplyDoneModifyNewContentElementWizardItemsEventListener.php:37ReplyDoneModifyNewContentElementWizardItemsEventListener.php:38ReplyDoneModifyNewContentElementWizardItemsEventListener.php:39ReplyDoneModifyNewContentElementWizardItemsEventListener.php:52ReplyDoneModifyNewContentElementWizardItemsEventListener.php:116ReplyDoneAbstractFileStorageAdapter.php:119ReplyFixed in the underlying change https://review.typo3.org/c/Packages/TYPO3.CMS/+/97438 (#111381)ModifyNewContentElementWizardItemsEventListenerTest.php:146ReplyDone -
core-ci voted on patch set 4 V +1 11/09/26, 14:00 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/113690
-
Josua Vogel rebased onto patch set 5
V +111/13/26, 09:39 -
core-ci voted on patch set 5 V +1 11/13/26, 09:48 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/114298
-
Soren Malling voted on patch set 5 V +1 11/13/26, 10:19
-
Dennis Purisevic commented on patch set 5 11/16/26, 12:37
Two general questions: 1. Wouldn’t it be better to put the form definitions into their own separate group, “Form definitions”? This way, a user can clearly differentiate between what are programmed forms and what are just definitions. 2. Should the inclusion of the form definitions in the new content element wizard be opt-in instead of opt-out? Currently, all form definitions would be present and would have to be disabled one by one. -
Josua Vogel commented on patch set 5 11/16/26, 19:37
Reply
Thanks for taking a look at the patch. 1. That could be done, but I think editors rarely distinguish between programmed forms and form definitions. To most of them, they’re just forms. 2. Personally, I prefer the opt-out option, since I believe the new layout improves the UX and is therefore the preferred approach. -
Dennis Purisevic commented on patch set 5 11/17/26, 08:39
Reply
Yea, no problem, the ext:form needs some love :D I can agree with you on the first point. On the second one, however, I have to disagree. One example: in a installation with around 10-30 forms, having all of them displayed in the wizard from the start, and therefore in two places (wizard and select), is a bit too much as a default. Yes, you could write an upgrade wizard, but displaying new ones by default is, in my opinion, too much. Where this could really be superior is in enabling it for the most-used form definitions. All forms would be in the select but all the important ones can be enabled to be displayed and used in the wizard. Maybe you have another view on the point I've made. Or we need a third opinion since we are biased, and asking my coworker wont make this better :D -
Josua Vogel uploaded patch set 6
V +111/17/26, 15:21 -
core-ci voted on patch set 6 V +1 11/17/26, 15:31 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/114750
-
Josua Vogel marked it ready for review 11/17/26, 15:42
-
Josua Vogel commented on patch set 6 11/17/26, 15:44
Reply
you convinced me 😊 I thought more about this and I think we need the possibility to control it per site. I added a new approach in page tsconfig -
Josua Vogel uploaded patch set 7
V +111/19/26, 10:13 -
core-ci voted on patch set 7 V +1 11/19/26, 10:21 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/114997