#105713Site sets setup.typoscript not loaded on Windows 10
Description
Currently on Windows 10 operating system, the new Site Sets setup.typoscript is not loaded with TYPO3 13.4.1 Version.
class: TYPO3\CMS\Core\TypoScript\IncludeTree\SysTemplateTreeBuilder
method: handleSetInclude
private function handleSetInclude(IncludeInterface $parentNode, string $path, string $label): void
{
echo $path; // 'D:/vhosts/xxx/test-t13.local/vendor/typo3/cms-fluid-styled-content/Configuration/Sets\FluidStyledContent/'
$path = GeneralUtility::getFileAbsFileName($path);
echo $path; // ''
Quick Hotfix:
private function handleSetInclude(IncludeInterface $parentNode, string $path, string $label): void
{
echo $path; // 'D:/vhosts/xxx/test-t13.local/vendor/typo3/cms-fluid-styled-content/Configuration/Sets\FluidStyledContent/'
// Hotfix with fixWindowsFilePath
$path = GeneralUtility::fixWindowsFilePath($path);
echo $path; // 'D:/vhosts/xxx/test-t13.local/vendor/typo3/cms-fluid-styled-content/Configuration/Sets/FluidStyledContent/'
$path = GeneralUtility::getFileAbsFileName($path);
echo $path; // 'D:/vhosts/xxx/test-t13.local/vendor/typo3/cms-fluid-styled-content/Configuration/Sets/FluidStyledContent/'Reviews 4
History 912
-
Markus Klein commented 11/27/24, 20:04
-
Garvin Hicking commented 11/27/24, 20:28
IMO we should check where that windows backslash is inserted and try to work with forward slashes instead. Probably some DIR_SEPARATOR is in there, or some normalization is missing…
(Don’t have a windows system to test this myself)
-
Steffen Mächtel commented 01/20/25, 17:18
For my self: i switched from Windows XAMPP to DDEV WSL2 to prevent Windows Path Issues.
I can investigate where all the Windows Paths come from.
Windows has no issues with mixed paths like D:/something/else\mypath/to\someother/directory
This kind of path work in Windows Explorer and with PHP on Windows.
TYPO3 Core functions like `GeneralUtility::getFileAbsFileName($path)` will check for UNIX Path Style.
I can investigate which PHP Functions are used for File and Path and which return Windows style. (propably all php functions on windows php)
-
André Markus commented 01/27/25, 12:18
Thanks for the quick bugfix with “$path = GeneralUtility::fixWindowsFilePath($path);“
Worked for me with Win10 and XAMPP. -
Markiian Baran commented 01/31/25, 12:35
André Markus wrote in #note-4:
> Thanks for the quick bugfix with “$path = GeneralUtility::fixWindowsFilePath($path);“
> Worked for me with Win10 and XAMPP.Quickfix also works on Windows 11.
Thank you! -
Steffen Mächtel commented 02/06/25, 21:24
I found the source from this issue.
Its in `class YamlSetDefinitionProvider` on line ~63.
$path = dirname($filename);
dirname() return windows path on windows php.
Here we need the `fixWindowsFilePath($path);` after `$path = dirname($filename);`.
I will try to create a patch now (via Contribution Guide)
-
Gerrit Code Review pushed patch set 1 for main to change 88060 status
NewUnder Review 02/06/25, 21:59 -
Gerrit Code Review pushed patch set 2 for main to change 88060 02/07/25, 11:33
-
Gerrit Code Review pushed patch set 1 for 13.4 to change 88073 02/07/25, 11:44
-
Steffen Mächtel commented and changed status
Under ReviewResolved done0 %100 % 02/07/25, 12:05Applied in changeset commit:e3299c9febd2eabc33937e70fcaf1a41d15c72cd.
-
Garvin Hicking commented 02/07/25, 12:22
Thank you Steffen for staying on this! :-)
-
Benni Mack changed status
ResolvedClosed 12/02/25, 14:31
Wanna push your change to the review system?