Kunstmaan / KunstmaanBundlesCMS

An advanced yet user-friendly content management system, based on the full stack Symfony framework combined with a whole host of community bundles. It provides a full featured, multi-language CMS system with an innovative page and form assembling process, versioning, workflow, translation and media managers and much more.
https://kunstmaancms.be
MIT License
402 stars 186 forks source link

[GeneratorBundle] kuma:generate:default-site throws exception with twig 2 #1926

Closed treeleaf closed 6 years ago

treeleaf commented 6 years ago

When you generate a default site with kuma:generate:default-site and you have twig 2 installed (tested with 2.4.8 and php 7.1), then it will throw an exception.

Twig_Error_Syntax: Unclosed comment. (uncaught exception) at .../vendor/kunstmaan/bundles-cms/src/Kunstmaan/GeneratorBundle/Resources/SensioGeneratorBundle/skeleton/layout/Resources/ui/scss/config/general/_colors.scss line 71 while running console command kuma:generate:default-site

hackzilla commented 6 years ago

I've just run into this issue.

How can I work around it?

hackzilla commented 6 years ago

@Devolicious The answer is to replace raw with verbatim

acrobat commented 6 years ago

@hackzilla I came also across this issue while testing #1200. The raw tag is deprecated in twig 1.x but does still work and removed in twig 2.0, so a temporary workaround can be to revert to twig 1. But this should indeed be fixed by switching to the verbatim tag

hackzilla commented 6 years ago

@acrobat makes sense.

I've just checked and I had twig v2.4.5

This project is very new to me, and I encountered the issue following the getting started guide.

acrobat commented 6 years ago

@hackzilla I've create a pr to fix this issue. If you want you can test the patch in #1987 until it's merged and released.