Project

General

Profile

Actions

Bug #104737

closed

Check for Broken Extensions shows "Loading ext_tables.php of extension "xyz" failed"

Added by Markus Ehrlich 6 months ago. Updated 17 days ago.

Status:
Closed
Priority:
Should have
Category:
Install Tool
Start date:
2024-08-26
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
13
PHP Version:
8.3
Tags:
Complexity:
Is Regression:
Sprint Focus:

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.


Files

Actions #2

Updated by Benjamin Franzke 6 months ago

  • Assignee set to Oliver Bartsch

quick investigation:

This is likely caused by https://review.typo3.org/c/Packages/TYPO3.CMS/+/84945
Since that change PageDoktypeRegistry became 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 @Oliver Bartsch

Actions #3

Updated by Benjamin Franzke 6 months ago

  • Status changed from New to Needs Feedback
  • Assignee deleted (Oliver Bartsch)

Please share the exact contents of the ext_tables.php files.

Could not verify with v13.2.1 having a ext_tables.php with:

<?php
use TYPO3\CMS\Core\DataHandling\PageDoktypeRegistry;
use TYPO3\CMS\Core\Utility\GeneralUtility;
$dokTypeRegistry = GeneralUtility::makeInstance(PageDoktypeRegistry::class);
Actions #4

Updated by Markus Ehrlich 5 months ago

  • Assignee set to Benjamin Franzke

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' => '*',
        ],
    );
})();

Actions #5

Updated by Garvin Hicking 5 months ago

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?

Actions #6

Updated by Benni Mack 4 months ago

  • Target version changed from 13.3 to Candidate for Major Version
Actions #7

Updated by Georg Ringer 17 days ago

  • Status changed from Needs Feedback to Closed

closing issue because of lack of feedback. feel free to ask me on e.g. slack to reopen if still valid! hope you understand

Actions

Also available in: Atom PDF