#105342Distribution Extension does not create page-tree
Description
Hello,
while activating following extension in ExtensionManager no pages will be created: https://github.com/TYPO3-Documentation/t3docs-examples. In logs you will find following Exception thrown from TcaSchemaFactory:
```
UndefinedSchemaException: No TCA schema exists for the name “pages”.
```
- In Bootstrap::init():155 was filled correctly
- After a while it hops into PackageActivationService::activate
- Rebuild Schema: $this->tcaSchemaFactory->rebuild($GLOBALS[‘TCA’]); Works, but that method is for functional tests only ;-)
- ImportExportUtility::importT3DFile
- Import::importData
- Import::writePages -> creates new DataHandler instance
- DataHandler::process_datamap
- DataHandler::initializeSlugFieldsToEmptyString
- While calling TcaSchemaFactory::get() the schema property is suddly empty
DataHandler is declared “shared: false” and injects TcaSchemaFactory which is declared “shared: true”
I remember a discussion with Lolli that such relations are problematic. Maybe that’s why a * new* instamce of TcaSchemaFactory was created?
Nice greetings
Stefan
Reviews 2
Related issues 1
History 1719
-
Stefan Froemken commented <span data-processor="relativetime" data-value="2024-10-18T08:49:26+00:00" > 10/18/24, 08:49 </span>
-
Stefan Froemken commented <span data-processor="relativetime" data-value="2024-10-18T09:12:28+00:00" > 10/18/24, 09:12 </span>
Just tested on TYPO3 13.4.0 Composer:
I can’t reproduce the issue while remove/req f.e. typo3/cms-seo or typo3/cms-dashboard. So, it’s not a problem with ext_tables.sql or Configuration/TCA/* files.
Only, if I remove/req t3docs/examples each process creates a new DI cache file.
Maybe it’s because of the Initialization process?? -
Eckard Gehrke commented and changed Is Regression 1 <span data-processor="relativetime" data-value="2024-10-18T19:23:35+00:00" > 10/18/24, 19:23 </span>
Hi,
I have the same issue. Installing complete new typo3 via zip files, install it, load distributions and install introduction package, success message appears but when “view / edit webpage” nothing happens, looking to the DB no pages created/inserted.
Same procedure works with typo3 v12 smoothly.
I am on WINDOWS with xampp. When you need any logs let me know.
Best regards
Eckard. -
Benni Mack commented <span data-processor="relativetime" data-value="2024-10-19T16:54:35+00:00" > 10/19/24, 16:54 </span>
Hey all,
can you let me know what MySQL version you are using?
-
Stefan Froemken commented <span data-processor="relativetime" data-value="2024-10-20T06:27:01+00:00" > 10/20/24, 06:27 </span>
Sure. Tested with MariaDB 10.4. I also thought about DB issue and updated to version 10.11. But problem is the same.
-
Eckard Gehrke commented <span data-processor="relativetime" data-value="2024-10-21T07:59:39+00:00" > 10/21/24, 07:59 </span>
I am using: 10.4.32-MariaDB part of xampp 8 2 12
-
Christian Kuhn commented <span data-processor="relativetime" data-value="2024-10-23T15:08:58+00:00" > 10/23/24, 15:08 </span>
Stefan Froemken wrote:
> DataHandler is declared “shared: false” and injects TcaSchemaFactory which is declared “shared: true“
>
> I remember a discussion with Lolli that such relations are problematic.Just to get this right: The other way is problematic: Injecting a stateful service (shared:false) into a stateless service (shared: true, default) makes your stateless consumer stateful and needs careful handling.
-
Garvin Hicking changed Related to #104378 <span data-processor="relativetime" data-value="2024-10-23T20:12:30+00:00" > 10/23/24, 20:12 </span>
-
Eckard Gehrke commented <span data-processor="relativetime" data-value="2024-11-05T16:06:20+00:00" > 11/05/24, 16:06 </span>
Hi
loading the data.xml file manually after install of package works. -
Christian Meyer commented <span data-processor="relativetime" data-value="2025-02-25T17:14:30+00:00" > 02/25/25, 17:14 </span>
Eckard Gehrke wrote in #note-9:
> Hi
> loading the data.xml file manually after install of package works.How do we load the data.xml manually?
-
Eckard Gehrke commented <span data-processor="relativetime" data-value="2025-02-26T07:15:51+00:00" > 02/26/25, 07:15 </span>
Christian Meyer wrote in #note-10:
> Eckard Gehrke wrote in #note-9:
> > Hi
> > loading the data.xml file manually after install of package works.
>
> How do we load the data.xml manually?I don’t know whom you mean by “we”. I was able to manually login to the backend and then import it into the page tree and hence into the DB.
This is stated also in the related issue: https://forge.typo3.org/issues/104378 When you extract the extension the you see the data.xml file.
-
Garvin Hicking commented and changed subject
Destribution Extension does not create page-treeDistribution Extension does not create page-tree statusNewAccepted <span data-processor="relativetime" data-value="2025-02-28T10:36:02+00:00" > 02/28/25, 10:36 </span>Short update on my journey for this.
The problem occurs once
PackageActivationService->activate()flushes several caches and then dispatches thePackageInitializationEvent()to subscribers.Now it gets fuzzy for me: I think the subscribers then do not know about the rebuilt container, and create a fresh TcaSchemaFactory instance, which has not (yet) received the
$GLOBALS['TCA']state.A fix would probably be to either make the event listeners be able to access the freshly built containers, or to harden the TcaSchemaFactory to reload from
$GLOBALS['TCA']if it’s totally fresh. -
Gerrit Code Review pushed patch set 1 for 13.4 to change 88512 status
AcceptedUnder Review <span data-processor="relativetime" data-value="2025-03-06T15:47:28+00:00" > 03/06/25, 15:47 </span> -
Gerrit Code Review pushed patch set 1 for main to change 88513 <span data-processor="relativetime" data-value="2025-03-06T15:48:13+00:00" > 03/06/25, 15:48 </span>
-
Helmut Hummel commented <span data-processor="relativetime" data-value="2025-03-06T16:01:43+00:00" > 03/06/25, 16:01 </span>
Please test the fix provided on Gerrit, whether it solves your issue
-
Helmut Hummel commented <span data-processor="relativetime" data-value="2025-03-07T16:03:04+00:00" > 03/07/25, 16:03 </span>
Stefan Froemken wrote in #note-1:
> WOW…I have over 10 var/cache/di/DependencyInjectionContainer_[hash].php files!!!
> With each activation/deactivation of an extensionTYPO3 creates a NEW DI cache file.This is expected and is working as designed. Each (de-)activation of a package creates a new cache file for DI, TCA, Packages, ext_localconf, ext_tables. This is required to ensure that caches are fresh with a new set of packages. The identifier is based on the modification time of the PackageStates.php file, because there is no other reliable and performant way to determine a reliable cache identifier.
@stefan: Can you bring up some arguments, why this is problematic in any way?
-
Helmut Hummel commented and changed status
Under ReviewResolved done0 %100 % <span data-processor="relativetime" data-value="2025-03-08T20:10:08+00:00" > 03/08/25, 20:10 </span>Applied in changeset commit:6af28e2d14dad78b54673e2b85b192906167fab8.
-
Stefan Froemken commented <span data-processor="relativetime" data-value="2025-03-11T12:18:06+00:00" > 03/11/25, 12:18 </span>
“This is expected and is working as designed.“
Sure, the old file has to be kept until the new file was written, registered and used. Normally the old cache file will be deleted afterwards. So, having 10 or more cache DI files is not normal and shows that the delete process is not functional properly.Thank you for taking care and providing that patch
Nice greetings
Stefan
-
Benni Mack changed status
ResolvedClosed <span data-processor="relativetime" data-value="2025-08-12T14:36:25+00:00" > 08/12/25, 14:36 </span>
WOW…I have over 10 var/cache/di/DependencyInjectionContainer_[hash].php files!!!
With each activation/deactivation of an extensionTYPO3 creates a NEW DI cache file.
Sure, in that case the $container->services does not know, that TcaSchemaFactory has already been loaded, and loads it again. Empty.
TYPO3: 13.4.0-dev
Commit: 924ced54ba1fb20b9edde8a3e98462ff83f11804
Mode: non-composer (Standalone/ZIP-package/legacy)