contao-themes-net / nature-theme-bundle

nature theme bundle for contao cms
Other
7 stars 2 forks source link

Pfadangabe von @import in nature.scss verursacht Fehler #3

Closed berecont closed 4 years ago

berecont commented 4 years ago

[2020-03-10 20:38:26] request.INFO: Matched route "tl_page.2.root". {"route":"tl_page.2.root","route_parameters":{"_token_check":true,"_controller":"Contao\\FrontendIndex::renderPage","_scope":"frontend","_locale":"de","pageModel":"[object] (Contao\\PageModel: {})","_route":"tl_page.2.root"},"request_uri":"http://nature.local/","method":"GET"} [] [2020-03-10 20:38:27] security.INFO: Populated the TokenStorage with an anonymous Token. [] [] [2020-03-10 20:38:27] request.CRITICAL: Uncaught PHP Exception ScssPhp\ScssPhp\Exception\CompilerException: "../../../../../../../files/naturetheme/scss/_custom_colorsfile not found for @import: line: 182, column: 1" at C:\laragon\www\nature\vendor\scssphp\scssphp\src\Compiler.php line 4725 {"exception":"[object] (ScssPhp\\ScssPhp\\Exception\\CompilerException(code: 0):../../../../../../../files/naturetheme/scss/_custom_colorsfile not found for @import: line: 182, column: 1 at C:\\laragon\\www\\nature\\vendor\\scssphp\\scssphp\\src\\Compiler.php:4725)"} []

Pfadänderung in nature.scss hilft das Problem zu lösen nature/vendor/contao-themes-net/nature-theme-bundle/src/Resources/public/scss/nature.scss @import "../../../files/naturetheme/scss/_custom_colors"; @import "../../../files/naturetheme/scss/_custom_variables"; @import '../../../files/naturetheme/scss/custom';

Umgebung: Contao 4.9.1 lokale Installation Windows 10 Laragon php7.2.19

seibtph commented 4 years ago

Das Problem sollte jetzt mit der Version 1.2.2 gelöst sein.

Wenn die fe_page_nature.html5 angepasst wurde, müsste folgende Zeile ...

$combiner->add('bundles/contaothemesnetnaturetheme/scss/nature.scss');

durch folgende Zeilen ersetzt werden:

if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
    $combiner->add('bundles/contaothemesnetnaturetheme/scss/nature_win.scss');
} else {
    $combiner->add('bundles/contaothemesnetnaturetheme/scss/nature.scss');
}