Skip to content

Commit

Permalink
[BUGFIX] Fix FormEngine inline stylesheet resolution in composer mode
Browse files Browse the repository at this point in the history
The public URL resolution in lazy loaded TCA forms (e.g. inline records)
is aligned to use the same path resolution mechanism as in PageRender.

Releases: main, 12.4, 11.5
Resolves: #103296
Change-Id: I981af29b34393302c49dd16216f0baa580d60767
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/83262
Tested-by: core-ci <typo3@b13.com>
Tested-by: Benjamin Franzke <ben@bnf.dev>
Reviewed-by: Benjamin Franzke <ben@bnf.dev>
  • Loading branch information
bnf committed Mar 11, 2024
1 parent e7c2a48 commit b3ee9ba
Showing 1 changed file with 3 additions and 1 deletion.
Expand Up @@ -17,6 +17,7 @@

namespace TYPO3\CMS\Backend\Controller;

use TYPO3\CMS\Core\Core\Environment;
use TYPO3\CMS\Core\Localization\LanguageService;
use TYPO3\CMS\Core\Localization\LanguageServiceFactory;
use TYPO3\CMS\Core\Page\JavaScriptItems;
Expand Down Expand Up @@ -62,7 +63,8 @@ protected function addJavaScriptModulesToJavaScriptItems(array $modules, JavaScr
protected function getRelativePathToStylesheetFile(string $stylesheetFile): string
{
if (PathUtility::isExtensionPath($stylesheetFile)) {
$stylesheetFile = GeneralUtility::getFileAbsFileName($stylesheetFile);
// @see PageRenderer::getStreamlinedFileName()
$stylesheetFile = Environment::getPublicPath() . '/' . PathUtility::getPublicResourceWebPath($stylesheetFile, false);
$stylesheetFile = PathUtility::getRelativePathTo($stylesheetFile) ?? '';
$stylesheetFile = rtrim($stylesheetFile, '/');
} else {
Expand Down

0 comments on commit b3ee9ba

Please sign in to comment.