grav-theme-medium icon indicating copy to clipboard operation
grav-theme-medium copied to clipboard

Can't use demo data with other templates

Open Sogl opened this issue 9 years ago • 2 comments
trafficstars

Hi!

I use grav one day. I have installed your theme by bin/gpm install medium with demo data and it works fine, but when I change it to another (Antimatter, for example), I see an error:

RuntimeException thrown with message "Template "post.html.twig" is not defined."

Stacktrace:
#9 RuntimeException in /Users/Artyom/domains/gravru/system/src/Grav/Common/Twig/Twig.php:345
#8 Twig_Error_Loader in /Users/Artyom/domains/gravru/vendor/twig/twig/lib/Twig/Loader/Chain.php:115
#7 Twig_Loader_Chain:getCacheKey in /Users/Artyom/domains/gravru/vendor/twig/twig/lib/Twig/Environment.php:312
#6 Twig_Environment:getTemplateClass in /Users/Artyom/domains/gravru/vendor/twig/twig/lib/Twig/Environment.php:378
#5 Twig_Environment:loadTemplate in /Users/Artyom/domains/gravru/vendor/twig/twig/lib/Twig/Environment.php:347
#4 Twig_Environment:render in /Users/Artyom/domains/gravru/system/src/Grav/Common/Twig/Twig.php:334
#3 Grav\Common\Twig\Twig:processSite in /Users/Artyom/domains/gravru/system/src/Grav/Common/Grav.php:186
#2 Grav\Common\Grav:Grav\Common\{closure} in /Users/Artyom/domains/gravru/vendor/pimple/pimple/src/Pimple/Container.php:113
#1 Pimple\Container:offsetGet in /Users/Artyom/domains/gravru/system/src/Grav/Common/Grav.php:288
#0 Grav\Common\Grav:process in /Users/Artyom/domains/gravru/index.php:38

How to fix it?

Sogl avatar Mar 01 '16 11:03 Sogl

I think in Antmatter, a post.md is actually called blog_item.md. Therefore you just need to change the name of the blog post files in /pages

mblode avatar Mar 01 '16 21:03 mblode

I think that's because I use ru default translation. After re-saving all posts in admin panel every post.md became blog.ru.md and finally it works with Antimatter. But now it doesn't work in Medium, just shows me empty content section.

Sogl avatar Mar 02 '16 11:03 Sogl