Closed garvinhicking closed 1 month ago
Okay, so this has something to do with how Symfony handles missing commands. It iterates over all registered commands and asks the TYPO3 CommandRegistry for an instance of the command. If the command is a Content Blocks command (e.g. LanguageGenerateCommand) the problem is, that the Bootstrap process of TYPO3 is skipped in this case leading to missing TCA and therefore the Content Blocks error occurs.
The DI error occurs when a TYPO3 command is requested, but the container is not built fully (only failsafe container) for the same reason as above.
So this error is heavily random and depends on the loading order of commands.
Content Blocks does not influence the behavior, it just provides Commands which depend on low level booting processes.
Ah, I see! Is there any way to make the CB Command recognize its "uninitialized" state and maybe not perform certain actions? Like not setting up internal dependencies that would require the stack to exist, because symfony probably just needs the setArguments() or other specific properties?
Thanks for investigating&explaining ☺️
Not sure, as this is DI that triggers this whole process. Only way could be by lazy loading dependencies with GU:makeInstance. But that's feels not right.
I understand. Doing the DI setup in Services.php to have some influence on it also doesn't feel demanded.
I'm good with closing the issue as "wontfix", it is rather some edge case scenario I can live with, knowing about it.
With a dev-main content-blocks extension installed and recent TYPO3v12, executing:
yields this error:
While in an installation without Content-Blocks, this would happen:
I suppose there's some kind of interference in overloading things that might break this. It's not a pressing issue because having a wrong command is not regular operation, but maybe this is something important to address.
Another thing that first happened - I got a lot of errors for many of our content blocks stating:
In this case even fieldtypes that had their
useExistingField: true
set (and should be type-inferred from TCA) were all reported. So probably at the early bootstrap phase there's a problem in not having the TCA resolved, and this is related to the error above?