Error while saving shopware default theme

I use production environment of Shopware 6 on Windows.

After installation and configurations. I got these error, looks like somewhere in config missing path symbol:

May be some one knows how to fix it?

Is E:os70OpenServeromains… a path or plugin name or something? Why are there special characters in it? This looks really odd.

1 „Gefällt mir“

Thank you for fast response!
It’s just a path to home site directory - E:\os7\OpenServer\domains\be3.sw.de\ … .
Don’t know why in error message it`s so corrupted.

I guess the path is the problem. Cannot you work with localhost or something like that?

I was able to solve the problem by changing the code in vendor\shopware\storefront\Theme\ThemeFileImporter.php from this:

    public function getConcatenableStylePath(File $file, StorefrontPluginConfiguration $configuration): string
    {
        return '@import \'' . $file->getFilepath() . '\';' . \PHP_EOL;
    }

    public function getConcatenableScriptPath(File $file, StorefrontPluginConfiguration $configuration): string
    {
        return file_get_contents($file->getFilepath()) . \PHP_EOL;
    }

to this:

    public function getConcatenableStylePath(File $file, StorefrontPluginConfiguration $configuration): string
    {
        return '@import \'' . str_replace('\\', '/', $file->getFilepath()) . '\';' . \PHP_EOL;
    }

    public function getConcatenableScriptPath(File $file, StorefrontPluginConfiguration $configuration): string
    {
        return file_get_contents(str_replace('\\', '/', $file->getFilepath())) . \PHP_EOL;
    }