paulmassen / grav-plugin-seo

Manage your site’s meta tags for display in search engine results or social media networks. Create and manage json-ld microdata. Includes an easy-to-use live preview feature.
MIT License
84 stars 21 forks source link

Server Error when I use "% include" #63

Open timbo-lino opened 6 years ago

timbo-lino commented 6 years ago

Hey,

a very nice plugin. But it break site creation when I include a partial into my sites

{% include 'partials/example.html.twig' %}

leads to:

Server Error
Sorry, something went terribly wrong!

0 - An exception has been thrown during the rendering of a template ("Template "partials/example.html.twig" is not defined.").
paulmassen commented 6 years ago

Hmm, it's not related to the plugin. it looks like it can't find the partials template.

You sure you have the file user/themes/yourtheme/templates/partials/example.html.twig ?

timbo-lino commented 6 years ago

As soon as I disable the SEO plugin it works fine

paulmassen commented 6 years ago

I'm sorry, but I need more info. Where do you use that include? in which template? are you using an existing theme?

timbo-lino commented 6 years ago

Okay!

  1. I use that include line ( {% include 'partials/example.html.twig' %} ) in default.md, not in a template. I do this because on some pages I want to embed an image, which is defined in expample.html.twig. As soon as I enable SEO Plugin I can not edit this pages with this include part in the backend (admin-panel). Frontend rendering works fine. Only backend rendering seems to the issue

  2. Theme does not matter. Tried it with Pinpress, Antimatter and Bootstrap.