Skip to content
Snippets Groups Projects
Commit c827d1f4 authored by Benjamin Franzke's avatar Benjamin Franzke
Browse files

[BUGFIX] Fix FormEngine inline stylesheet resolution in composer mode

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/+/83399


Tested-by: default avatarBenjamin Franzke <ben@bnf.dev>
Tested-by: default avatarcore-ci <typo3@b13.com>
Reviewed-by: default avatarBenjamin Franzke <ben@bnf.dev>
parent 951a97c6
Branches
Tags
No related merge requests found
......@@ -18,6 +18,7 @@ declare(strict_types=1);
namespace TYPO3\CMS\Backend\Controller;
use TYPO3\CMS\Backend\Form\FormResultTrait;
use TYPO3\CMS\Core\Core\Environment;
use TYPO3\CMS\Core\Localization\LanguageService;
use TYPO3\CMS\Core\Localization\LocalizationFactory;
use TYPO3\CMS\Core\Page\JavaScriptItems;
......@@ -106,7 +107,8 @@ abstract class AbstractFormEngineAjaxController
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 {
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment