Issue Bug Closed

#104527Site Sets Includes are not Included in the request frontend.typoscript attribute

Joël Maximilian Mai 08/01/24, 20:34 updated 10/07/24, 15:13

Description

So we are currently upgrading many extensions and the previous way of getting the build typoscript did not work in v13 anymore.
So we had to use the request attributes. While using the request itself in our event listners were mixed expierience. We have noticed that the typoscript config we wanted to include has not shown up…

But first things first. Injecting the Server Request in our construct method of the event listner has resulted in an empty array for the attributes of said request while using $GLOBASL[‘TYPO3_REQUEST’] has worked just fine.

In this “global request” the typoscript did not include the extensions site sets we had included in the site settings…
so we checked that.

But we have noticed that just copying the same typoscript to the root ts record has worked fine with using the “global request” object…

I cannot provide further inside since I am not that familiar with the building of the typoscript and how site sets are taken into account. But I guess that they are included at a different time?

Here are a few Informations to reproduce the Bug itself:

Make a EventListener that listens to the beforeStyleSheetsRendering or beforeJavaScriptsRendering Event.
Inject the ServerRequest or just use the “Global Request”.
Include your Extension Site Set in the Site Settings for the Site you are using.
Notice that only some core Typoscript Configurations are included in the attribute frontend.typoscript

public function __construct(Minifier $minifier, ServerRequestInterface $request)
    {
        $this->minifier = $minifier;
        debug($request->getAttributes());
        debug($GLOBALS['TYPO3_REQUEST']->getAttributes());
        die;
        $frontendTypoScript = $GLOBALS['TYPO3_REQUEST']->getAttribute('frontend.typoscript');
        if ($frontendTypoScript instanceof FrontendTypoScript) {
            $this->assetCollectorConf = $frontendTypoScript->getSetupArray()['plugin.']['tx_min.']['assetCollector.'] ?? [];
        }
    }

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.