Site variables error

Since enabling twig in system.yaml and adding varialbes to site.yaml I am getting an ‘0 - A block must start with a tag name’ error on certain pages. I am using the RTFM skeleton. Does anybody know why this might be happening?

The site variable that I am using is {{ site.prodname }}
The pages that the error appears on contain code snippets that contain variables which utilise {{ }}
These variables are not related to grav – they are instructions for another product. Could they be confusing the twig processor?

Log output:

[2017-05-23 17:47:58] grav.CRITICAL: A block must start with a tag name in “@Page:/home/mike/dev/grav-skeleton-rtfm-site/user/pages/05.sdk-instru ctions/01.tornado” at line 104. - Trace: #0 /home/mike/dev/grav-skeleton-rtfm-site/vendor/twig/twig/lib/Twig/Parse r.php(103): Twig_Parser->subparse(NULL, false) #1 /home/mike/dev/grav-skeleton-rtfm-site/vendor/twig/twig/lib/Twig/Envir onment.php(692): Twig_Parser->parse(Object(Twig_TokenStream)) #2 /home/mike/dev/grav-skeleton-rtfm-site/vendor/twig/twig/lib/Twig/Envir onment.php(750): Twig_Environment->parse(Object(Twig_TokenStream)) #3 /home/mike/dev/grav-skeleton-rtfm-site/vendor/twig/twig/lib/Twig/Envir onment.php(447): Twig_Environment->compileSource(Object(Twig_Source)) #4 /home/mike/dev/grav-skeleton-rtfm-site/vendor/twig/twig/lib/Twig/Envir onment.php(362): Twig_Environment->loadTemplate(’@Page:/home/mik…’) #5 /home/mike/dev/grav-skeleton-rtfm-site/system/src/Grav/Common/Twig/Twi g.php(246): Twig_Environment->render(’@Page:/home/mik…’, Array) #6 /home/mike/dev/grav-skeleton-rtfm-site/system/src/Grav/Com mon/Page/Pag e.php(747): Grav\Common\Twig\Twig->processPage(Object(Grav\Common\Page\Page), ’


Tabl...') #7 /home/mike/dev/grav-skeleton-rtfm-site/system/src/Grav/Common/Page/Pag e.php(631): Grav\Common\Page\Page->processTwig() #8 /home/mike/dev/grav-skeleton-rtfm-site/system/src/Grav/Common/Twig/Twi g.php(324): Grav\Common\Page\Page->content() #9 /home/mike/dev/grav-skeleton-rtfm-site/system/src/Grav/Common/Service/ OutputServiceProvider.php(19): Grav\Common\Twig\Twig->processSite('html') #10 /home/mike/dev/grav-skeleton-rtfm-site/vendor/pimple/pimple/src/Pimple /Container.php(113): Grav\Common\Service\OutputServiceProvider->Grav\Common\Service\{closur e}(Object(Grav\Common\Grav)) #11 /home/mike/dev/grav-skeleton-rtfm-site/system/src/Grav/Common/Processo rs/RenderProcessor.php(18): Pimple\Container->offsetGet('output') #12 /home/mike/dev/grav-skeleton-rtfm-site/system/src/Grav/Common/Grav.php (126): Grav\Common\Processors\RenderProcessor->process() #13 /home/mike/dev/grav-skeleton-rtfm-site/system/src/Grav/Common/Grav.php (368): Grav\Common\Grav->Grav\Common\{closure}() #14 [internal function]: Grav\Common\Grav::Grav\Common\{closure}('render', 'Render', Object(Closure)) #15 /home/mike/dev/grav-skeleton-rtfm-site/system/src/Grav/Common/Grav.php (344): call_user_func_array(Object(Closure), Array) #16 /home/mike/dev/grav-skeleton-rtfm-site/system/src/Grav/Common/Grav.php (127): Grav\Common\Grav->__call('measureTime', Array) #17 /home/mike/dev/grav-skeleton-rtfm-site/index.php(52): Grav\Common\Grav->process() #18 {main} [] []

Yes, they can confuse the Twig parser. If Twig processing is enabled on those pages header (or globally), use the verbatim twig tag to avoid processing the page content you don’t want.

Thanks Flavio. The verbatim tag fixed it :slight_smile: