#96984Duplicate data imports with typo3/cms-composer-installers v4
Description
I have tried the upcoming composer installer v4 (“typo3/cms-composer-installers:4.0.x@dev”). This leads to a duplicate execution of data imports and in my case to a duplicate tree in the backend (duplicate “Initialisation/” import execution).
sys_registry entry before upgrade:- entry_namespace: extensionDataImport
- entry_key: typo3conf/ext/extension/Initialisation/dataImported
- entry_namespace: extensionDataImport
- entry_key: or/company/extension/Initialisation/dataImported
This occurs because of the changed package path https://github.com/TYPO3/typo3/blob/v11.5.6/typo3/sysext/extensionmanager/Classes/Utility/InstallUtility.php#L450
Composer Installer v3: /var/www/app/www/typo3conf/ext/extension/ -> typo3conf/ext/extension/
Composer Installer v4: /var/www/app/vendor/company/extension/ -> or/company/extension/
Is this issue already known?
Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.
Related issues 1
History 6
-
Helmut Hummel commented and changed status
NewAccepted Complexity hard <span data-processor="relativetime" data-value="2022-02-26T12:43:35+00:00" > 02/26/22, 12:43 </span> -
Alexander Vogt commented <span data-processor="relativetime" data-value="2022-02-28T17:04:02+00:00" > 02/28/22, 17:04 </span>
In our case we have entry keys like “or/company/extension/Initialisation/dataImported”. We have a “or” prefix because we use the web-dir name “www” instead of “public” in this project. So the key with the default web-dir “public” is “company/extension/Initialisation/dataImported”. That looks better :). But it is maybe better to fully ignore the package path and only use the extension name in the future.
I’m not sure about the best solution. Maybe there should be a upgrade wizard which migrates the previous “typo3conf/ext/extension/Initialisation/dataImported” keys to the new key “company/extension/Initialisation/dataImported”. But the issue in our case would be the “extension:setup” command in our composer.json. A Upgrade wizard will always be too late because this command executes the extension setup (InstallUtility->processExtensionSetup) after the composer update and thereby leads to the duplicate import execution.
A temporary workaround is possible via the event “TYPO3\CMS\Core\Package\Event\PackagesMayHaveChangedEvent”. This is executed before the “processExtensionSetup” call and allows the correction of the entry keys.
-
Helmut Hummel changed Related to #103009 <span data-processor="relativetime" data-value="2024-06-19T14:38:22+00:00" > 06/19/24, 14:38 </span>
-
Helmut Hummel changed
Related to #103009<span data-processor="relativetime" data-value="2024-06-19T15:12:36+00:00" > 06/19/24, 15:12 </span> -
Benni Mack changed Related to #107123 <span data-processor="relativetime" data-value="2026-04-28T06:10:43+00:00" > 04/28/26, 06:10 </span>
-
Benni Mack commented and changed status
AcceptedClosed <span data-processor="relativetime" data-value="2026-04-28T06:10:55+00:00" > 04/28/26, 06:10 </span>we’ve fixed this with #107123
Thanks! Looks valid.
Any idea and help to fix this is appreciated.