Review main Merged

95032[BUGFIX] Ensure LanguagePackCommand does not load TCA in scheduler mode

Benjamin Franzke CR +2 V +2 Easy +11 −3 updated 09/10/26, 08:09

Commit message

The `LanguagePackCommand` is registered as a failsafe command
in order to be usable when the system is not installed yet
and in order to be able to run, when the full bootstap fails.
Therefore it has to load TCA explicitly via `BootService` if
run via CLI. When this command is dispatched from the scheduler
service, the bootstrap did actually run and TCA was already loaded,
therefore an explicit load will cause a second TCA load, which may
cause issues due to double initialization.

To ensure we only load TCA if needed, from which container we are
loaded to detect if TCA loading is required.

Review

  • Code review CR +2 Done
    • Benjamin Franzke +2
    • Georg Ringer +2
    • Garvin Hicking +1
    • Stefan Bürk +1
    • Josua Vogel +1
  • Verified V +2 Done
    • Benjamin Franzke +2
    • Georg Ringer +2
    • Garvin Hicking +1
    • Stefan Bürk +1
    • core-ci +1 CI

Issues 1

Files 2

Review log 1214

  1. Benjamin Franzke uploaded patch set 1 07/31/26, 06:45

  2. core-ci voted on patch set 1 V +1 07/31/26, 06:53 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/105735

  3. Garvin Hicking voted on patch set 1 CR +1 07/31/26, 07:37

  4. Benni Mack voted on patch set 1 CR +1 07/31/26, 08:14

  5. Garvin Hicking commented on patch set 1 V +1 07/31/26, 19:23

    I checked the other commands like UpgradeWizardRunCommand, DebugBackendModulesCommand, AssetPublish etc. - they all do the `loadExtLocalconfDatabase` / lateBootService dance a bit differently. Since all of them are non-schedulable I guess there's no reason for it to be unified.
  6. Stefan Bürk commented on patch set 1 CR -1 08/01/26, 09:26

    > usable when the system is not installed yet That would be nice, but I'd say that this change is not enough. Language pack download uses `sys_registry` and without a installation that table does not exists and fails to safe the download state. `LanguagePackService::languagePackDownload()` is called and uses the registry: ``` $this->registry->set('languagePacks', $iso . '-' . $key, time()); ``` That's for the "language pack download UI" in the install tool to show the last updated state. To be honest I did not test this change (yet), but from company pipelines where we have all configurations and stuff in please before deployment and **only** the database is not **created** the command already crashes with a database call if executed in the pipeline and not on the deployed to the target system. The registry set call itself is not exception safe and not catched - so I'd say to complete the stated state from the commit message that would also need an eye and a solution. Personally I would possibly wrap the registry set call in a try-catch block to still allow language pack downloads in that state - in most cases users requiring that command in that state does not care about the ui and the "last updated" info anyway - or simply click it anyways in the ui. What do you think ? typo3/sysext/core/Classes/Localization/LanguagePackService.php L237
  7. Stefan Bürk rebased onto patch set 2 CR +1 V +1 09/03/26, 19:50

  8. core-ci voted on patch set 2 V +1 09/03/26, 19:58 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/107778

  9. Stefan Bürk commented on patch set 2 CR +1 V +1 09/03/26, 20:05

    Reply

    With 95171: [BUGFIX] Store language pack state in JSON file | https://review.typo3.org/c/Packages/TYPO3.CMS/+/95171 the registry is gone - so my remark does not count anymore. Closing it. However, I removed `13.4` from the release line related to the release line of the above mentioned change.
  10. Garvin Hicking voted on patch set 2 CR +1 V +1 09/04/26, 06:27

  11. Josua Vogel voted on patch set 2 CR +1 09/04/26, 06:30

  12. Georg Ringer voted on patch set 2 CR +2 V +2 09/09/26, 15:12

  13. Benjamin Franzke voted on patch set 2 CR +2 V +2 09/10/26, 08:09

  14. Benjamin Franzke merged patch set 3 09/10/26, 08:09