#104737Check for Broken Extensions shows "Loading ext_tables.php of extension "xyz" failed"
Description
Calling GeneralUtility::makeInstance in the file `ext_tables.php` of a custom extension results in the installation tool displaying, that the file `ext_tables.php` cannot be loaded.
Nevertheless, the extension appears to be working normally.
Own DokTypes should be registered in `ext_tables.php` with the following call:
$dokTypeRegistry = GeneralUtility::makeInstance(PageDoktypeRegistry::class);
I couldn’t see the behavior in v13.1 yet. I’m currently running v13.2.1.
Reviews 5
- 13.4 89612[BUGFIX] Dispatch BeforeTcaOverridesEvent in TcaFactory->createNotMigrated
- main 89604[BUGFIX] Dispatch BeforeTcaOverridesEvent in TcaFactory->createNotMigrated
- 13.4 89415[BUGFIX] Set up TCA in install tool's ext_tables.php tester
- main 89412[BUGFIX] Set up TCA in install tool's ext_tables.php tester
- main 84945[TASK] Register allowed record types on-demand in PageDoktypeRegistry
Related issues 2
Files 1
History 1720
-
Markus Ehrlich changed attached Bildschirmfoto 2024-08-26 um 13.38.43.png <span data-processor="relativetime" data-value="2024-08-26T11:39:11+00:00" > 08/26/24, 11:39 </span>
-
Benjamin Franzke commented and changed assigned to Oliver Bartsch <span data-processor="relativetime" data-value="2024-08-29T11:46:34+00:00" > 08/29/24, 11:46 </span>
-
Benjamin Franzke commented and changed status
NewNeeds Feedback removed the assignee <span data-processor="relativetime" data-value="2024-08-29T11:56:13+00:00" > 08/29/24, 11:56 </span>Please share the exact contents of the
ext_tables.phpfiles.Could not verify with v13.2.1 having a
ext_tables.phpwith:<?php use TYPO3\CMS\Core\DataHandling\PageDoktypeRegistry; use TYPO3\CMS\Core\Utility\GeneralUtility; $dokTypeRegistry = GeneralUtility::makeInstance(PageDoktypeRegistry::class);
-
Markus Ehrlich commented and changed assigned to Benjamin Franzke <span data-processor="relativetime" data-value="2024-09-02T09:48:20+00:00" > 09/02/24, 09:48 </span>
Here is content of my ext_tables.php file:
<?php declare(strict_types=1); use TYPO3\CMS\Core\DataHandling\PageDoktypeRegistry; use TYPO3\CMS\Core\Utility\GeneralUtility; defined('TYPO3') or die(); (function () { /** * Register doktype 110 for article pages */ $articlePageDoktype = 110; $dokTypeRegistry = GeneralUtility::makeInstance(PageDoktypeRegistry::class); $dokTypeRegistry->add( $articlePageDoktype, [ 'type' => 'web', 'allowedTables' => '*', ], ); })(); -
Garvin Hicking commented <span data-processor="relativetime" data-value="2024-09-02T14:20:25+00:00" > 09/02/24, 14:20 </span>
Hi Markus,
hm I used your exact file and it works in my environment. Are you able to test this with a GIT “main” version?
-
Benni Mack changed target version <span data-processor="relativetime" data-value="2024-10-15T08:19:07+00:00" > 10/15/24, 08:19 </span>
-
Georg Ringer commented and changed status
Needs FeedbackClosed <span data-processor="relativetime" data-value="2025-01-26T21:46:57+00:00" > 01/26/25, 21:46 </span>closing issue because of lack of feedback. feel free to ask me on e.g. slack to reopen if still valid! hope you understand
-
Benoit Chenu commented <span data-processor="relativetime" data-value="2025-05-09T16:25:03+00:00" > 05/09/25, 16:25 </span>
I’ve got exactly the same error on the 13.4.9. The error occurs when PageDoktypeRegistry is simply instanciated:
<?php declare(strict_types=1); use TYPO3\CMS\Core\DataHandling\PageDoktypeRegistry; use TYPO3\CMS\Core\Utility\GeneralUtility; defined('TYPO3') || die(); (function () { GeneralUtility::makeInstance(PageDoktypeRegistry::class); })();I used xdebug to find the original problem and an exception effectively occurs:
message = "The field "layout" is missing the required "type" in Content Block "site/images"." file = "/var/www/html/vendor/friendsoftypo3/content-blocks/Classes/Definition/Factory/ContentBlockCompiler.php" line = 967
The layout field is added by content-blocks extension if we add this in the content element configuration:
basics: - TYPO3/AppearanceBut the “basic” configuration defined by content-blocks extension is too light:
# To be used within ContentElements identifier: TYPO3/Appearance fields: - identifier: appearance_tab type: Tab label: LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:tabs.appearance - identifier: frames_palette type: Palette label: LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:palette.frames fields: - identifier: layout useExistingField: true - identifier: frame_class useExistingField: true - identifier: space_before_class useExistingField: true - identifier: space_after_class useExistingField: trueSo this is a friendsoftypo3/content-blocks bug, I will report and fix this.
By the way, finding this kind of error is a little bit touchy. It should to find to at least display the exception in backend interface. I also will open a issue for that.
-
Benoit Chenu commented <span data-processor="relativetime" data-value="2025-05-09T16:29:16+00:00" > 05/09/25, 16:29 </span>
Sorry, my last sentence means nothing :)
At least there should be a way to display the exception in the backend interface.
-
Benoit Chenu commented <span data-processor="relativetime" data-value="2025-05-09T17:25:06+00:00" > 05/09/25, 17:25 </span>
Issue with fix on friendsoftypo3/content-blocks : https://github.com/FriendsOfTYPO3/content-blocks/issues/377
-
Benoit Chenu commented <span data-processor="relativetime" data-value="2025-05-09T17:36:16+00:00" > 05/09/25, 17:36 </span>
Issue on core: https://forge.typo3.org/issues/106674
-
Nikita Hovratov commented <span data-processor="relativetime" data-value="2025-05-09T18:01:52+00:00" > 05/09/25, 18:01 </span>
This issue currently occurs with the Content Blocks extension, because it extends PageDokTypeRegistry with a Service Provider. As Content Blocks relies on loaded TCA, the ext_tables.php check fails. The check apparently doesn’t load any TCA. A comment in PageDokTypeRegistry suggests it can only be fully used with loaded TCA:
You can fully use this once TCA is properly loaded (e.g. in ext_tables.php)..Not sure how much sense it makes to test ext_tables.php in isolation anyway if it relies on global state.
-
Nikita Hovratov changed status
ClosedNew <span data-processor="relativetime" data-value="2025-05-09T18:03:05+00:00" > 05/09/25, 18:03 </span> -
Garvin Hicking changed Related to #106674 <span data-processor="relativetime" data-value="2025-05-09T20:03:57+00:00" > 05/09/25, 20:03 </span>
-
Gerrit Code Review pushed patch set 1 for main to change 89412 status
NewUnder Review <span data-processor="relativetime" data-value="2025-05-15T20:47:34+00:00" > 05/15/25, 20:47 </span> -
Gerrit Code Review pushed patch set 2 for main to change 89412 <span data-processor="relativetime" data-value="2025-05-16T06:45:06+00:00" > 05/16/25, 06:45 </span>
-
Gerrit Code Review pushed patch set 1 for 13.4 to change 89415 <span data-processor="relativetime" data-value="2025-05-16T07:10:00+00:00" > 05/16/25, 07:10 </span>
-
Nikita Hovratov commented and changed status
Under ReviewResolved done0 %100 % <span data-processor="relativetime" data-value="2025-05-16T07:15:08+00:00" > 05/16/25, 07:15 </span>Applied in changeset commit:f4bade0701a26d5cc80a527a816d48b69fe927c5.
-
Nikita Hovratov changed Related to #106810 <span data-processor="relativetime" data-value="2025-06-02T15:53:25+00:00" > 06/02/25, 15:53 </span>
-
Benni Mack changed status
ResolvedClosed <span data-processor="relativetime" data-value="2025-08-12T14:37:05+00:00" > 08/12/25, 14:37 </span>
quick investigation:
This is likely caused by https://review.typo3.org/c/Packages/TYPO3.CMS/+/84945
Since that change
PageDoktypeRegistrybecame a service that requires DI.I would have said, that the ext_tables.php check needs to use LateBootService and boot a container, but it should already do that in typo3/sysext/install/Classes/Service/LoadTcaService.php – so I don’t know the exact reason right now.
Needs to be checked manually…
CC @obartsch