Issue Bug Closed

#105713Site sets setup.typoscript not loaded on Windows 10

Steffen Mächtel 11/27/24, 18:58 updated 12/02/25, 14:31

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

  1. Markus Klein commented 11/27/24, 20:04

    Wanna push your change to the review system?

  2. 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)

  3. 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)

  4. 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.

  5. 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!

  6. 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)

  7. Gerrit Code Review pushed patch set 1 for main to change 88060 status New Under Review 02/06/25, 21:59

  8. Gerrit Code Review pushed patch set 2 for main to change 88060 02/07/25, 11:33

  9. Gerrit Code Review pushed patch set 1 for 13.4 to change 88073 02/07/25, 11:44

  10. Steffen Mächtel commented and changed status Under Review Resolved done 0 % 100 % 02/07/25, 12:05

    Applied in changeset commit:e3299c9febd2eabc33937e70fcaf1a41d15c72cd.

  11. Garvin Hicking commented 02/07/25, 12:22

    Thank you Steffen for staying on this! :-)

  12. Benni Mack changed status Resolved Closed 12/02/25, 14:31