Important: FlexForm paths change for the plugin structures
Description
The FlexForm data structures of the plugins have moved. Compared with the last
2.x release, the folder layout of
EXT: is now:
| Structure | In 2.3.4 | In 3.0.0 |
|---|---|---|
List., Detail. | Core12/, Core13/ | Core13/, Core14/ |
Selected, Selected | Core12/, Core13/ | directly in Flex |
The Core12/ variants are gone with TYPO3 v12 support.
Selected and Selected are identical on
every supported version and are no longer duplicated. List. and
Detail. keep their Core13/ path and gain a Core14/
sibling.
Those two still need a variant per version because of
settings., the only field in this extension configured
with a
value. TYPO3 changed how it reads the items of that picker,
and it is the one item list core never made readable in both directions:
| TYPO3 | Reads | Given the other form |
|---|---|---|
| v13 | the positional pair
$item /
$item |
Undefined array key 1
, then a
Type - the element
renders nothing and the plugin cannot be opened |
| v14 |
$item /
$item | migrated on the fly, at the price of an
E_ |
FlexForm XML cannot carry a runtime switch, so the two forms need two files.
Configuration/TCA/Overrides/tt_content.php selects the folder from the
running major version.
Impact
Nothing changes for a site that installs the extension and configures its plugins in the backend. The plugin options are the same on both TYPO3 versions.
Affected Installations
Installations that reference one of the four data structures by path - for
example an extension or site package that registers the same structure for a
content element of its own, or overrides it through
$GLOBALS.
References to Core12/… and to Core13/ or
Core13/ no longer resolve. References to
Core13/ and Core13/ keep working, but only
deliver the TYPO3 v13 variant.
Solution
Reference the two shared structures directly:
FILE:EXT:academic_persons/Configuration/FlexForms/SelectedProfiles.xml
FILE:EXT:academic_persons/Configuration/FlexForms/SelectedContracts.xml
For the two split ones, select the variant that matches the running TYPO3 version, the way this extension does:
use TYPO3\CMS\Core\Information\Typo3Version;
$flexFormPath = 'FILE:EXT:academic_persons/Configuration/FlexForms/'
. ((new Typo3Version())->getMajorVersion() < 14 ? 'Core13' : 'Core14')
. '/';
// $flexFormPath . 'List.xml'
// $flexFormPath . 'Detail.xml'
Once support for TYPO3 v13 is dropped, the Core13 variants go away and
the Core14 ones move back up one level.