Project

General

Profile

Actions

Bug #104527

closed

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

Added by Joël Maximilian Mai 4 months ago. Updated about 2 months ago.

Status:
Closed
Priority:
Should have
Category:
TypoScript
Target version:
Start date:
2024-08-01
Due date:
% Done:

0%

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

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.'] ?? [];
        }
    }

Files

Screenshot Capture - 2024-08-01 - 22-31-02.png (67.1 KB) Screenshot Capture - 2024-08-01 - 22-31-02.png debugs of request in frontend Joël Maximilian Mai, 2024-08-01 20:33
Actions

Also available in: Atom PDF