lia / lia_multicolumnwizard
TYPO3 extension for introducing a new TCA type for grouping fields into duplicable rows.
Package info
github.com/LOUISINTERNET/lia_multicolumnwizard
Type:typo3-cms-extension
pkg:composer/lia/lia_multicolumnwizard
Requires
- typo3/cms-core: ^13.4 || ^14.0
Requires (Dev)
Suggests
None
Provides
None
Conflicts
None
Replaces
- lia/lia-multicolumnwizard: 3.0.0
README
This extension adds an new TCA-Type that allows to group fields into rows that can be multiplied.
Compatibility
| Version | TYPO3 |
|---|---|
| 3.x | 13.4, 14 |
| 2.1–2.3 | 13.4, 14 |
| 2.0 | 13.4 |
Upgrading from 2.x to 3.0
Breaking change: the column option
linkUseFieldwas removed. A link column that still sets it throws anInvalidOptionValueException(code1793952001) and the record can no longer be edited until the option is removed.
Up to 2.x a column of type link opened the link browser through a second TCA field
of type link in the same record (the "proxy field" named by linkUseField), which
had to be in showitem and was hidden by JavaScript. From 3.0 the wizard opens the
link browser itself. The proxy field is not needed anymore and has to go.
The rows stored by the wizard keep their JSON format: no data migration is needed, existing links stay as they are.
Steps
-
Raise the constraint in the
composer.jsonof the project:composer require "lia/lia_multicolumnwizard:^3.0" -
Find every link column with a proxy field:
grep -rn "linkUseField" extensions/ packages/ config/This covers TCA in PHP (
columnFields,columnsOverrides) as well as FlexForm XML (<linkUseField>). -
Remove the
linkUseFieldoption from each hit.TCA (PHP), before:
'link' => [ 'type' => 'link', 'label' => 'Link', 'linkUseField' => 'tx_myext_link_proxy', ],
after:
'link' => [ 'type' => 'link', 'label' => 'Link', ],
FlexForm (XML): delete the
<linkUseField>…</linkUseField>line of the column. -
Carry over restrictions of the proxy field. If the TCA of the proxy field restricted the link browser, set the same values on the wizard column. The options sit directly on the column (not under
appearance):Proxy field (TCA type link)Wizard column (3.0) allowedTypesallowedTypesappearance.allowedOptionsallowedOptionsappearance.allowedFileExtensionsallowedFileExtensionsEach is a non-empty list of strings.
recordis not expanded to the record link handlers; list their identifiers fromTCEMAIN.linkHandlerinstead. -
Remove the proxy field, if it existed only for the wizard:
- its entry in
showitemor the palette it was placed in, - its column definition in the TCA (
addTCAcolumnsor['columns'][…]), - its column in
ext_tables.sqland its label in the language files, - any code that only existed to position or hide it (event listeners, TSconfig).
Check before deleting: some projects pointed
linkUseFieldat a real field such asheader_link. Keep such a field and only remove the option from the wizard column. - its entry in
-
Flush caches and drop the proxy column in Admin Tools → Maintenance → Analyze Database Structure (
typo3 extension:setuponly adds columns, it does not drop them). The column holds no data of its own, at most a copy of a link that is stored in the wizard rows anyway. -
Check the backend: open a record with the wizard, pick, change and clear a link and save. The former proxy field must no longer appear in the form.