Issue Bug Closed

#110290Extension Manager fatals on outdated extension list records

Stefan Bürk 07/24/26, 20:47 updated 08/11/26, 08:51

Description

Problem

With #104515 (“Free table tx_extensionmanager_domain_model_extension from TCA”) the actions of EXT:extensionmanager which operate on a single remote (TER) extension record stopped receiving an Extbase mapped domain object. They now take an integer uid and resolve the record themselves:

bc. – public function checkDependenciesAction(Extension $extension): ResponseInterface
+ public function checkDependenciesAction(int $extension): ResponseInterface {
+ $extension = $this->extensionRepository->findByUid($extension);

“ExtensionRepository::findByUid()” is declared as “?Extension”, but none of the call sites handles the null case:

  • “DownloadController::checkDependenciesAction()”
  • “DownloadController::installFromTerAction()”
  • “DownloadController::checkDistributionDependenciesAction()”
  • “DownloadController::installDistributionAction()”
  • “DistributionController::showAction()”

A missing record therefore ends in either a TypeError (null passed to a method typed against “Extension”) or “Attempt to read property … on null”. Both are “\Error”, which is not covered by the surrounding “catch (\Exception)” blocks, so the request dies with a fatal error instead of reporting a problem.

Why this is reachable

“BulkExtensionRepositoryWriter::import()” deletes all rows of a remote and bulk-inserts the parsed extension list again. Every “Update extension list from TER” therefore reassigns all uids of “tx_extensionmanager_domain_model_extension”. Any Extension Manager view rendered before such an update carries uids which no longer exist.

How to reproduce

  1. Open the Extension Manager in classic (non composer) mode and switch to “Get Extensions”
  2. Update the extension list from TER a second time, e.g. from another browser tab or window
  3. Return to the first tab and press “Import and Install” (or open a distribution detail view)

Expected

A controlled and speaking error, telling that the record is not available anymore.

Actual

An uncaught PHP “\Error” / fatal error.

Before #104515 the actions were typed against “Extension” and Extbase property mapping turned an unresolvable uid into a regular mapping error instead of a fatal.

Affected branches

The removal landed in 14.0, 14.1, 14.3 and main. Maintained are main and 14.3.

Reviews 7