I changed from apache to nginx today, and after a few hickups I can see the site just fine.
At the same time there was a grav version update, from 1.1.8 to 1.1.9 iirc.
Now the comments and simplesearch plugins are not working anymore and I’m having a hard time troubleshooting: no log entries, no errors.
the comments don’t show up at all where I reserved a place for them in theme/templates/item.html.twig:
<div id="item" class="block pure-u-2-3">
{% include 'partials/blog_item.html.twig' with {'blog':page.parent, 'truncate':false } %}
{% include 'partials/comments.html.twig' with {'page': page} %}
</div>
partials/comments.html.twig is being evaluated, and if i remove this if-clause:
{% if grav.twig.enable_comments_plugin %}
i can at least see the form, but nothing is submitted, not on the page, not to my email.
the simplesearch plugin is doing equally strange things:
i can enter /search/query:somequery manually, and get results for somequery, but i cannot use the simplesearch_searchbox.html.twig to submit searches. javascript IS enabled.
thanks for reading, I hope there’s a solution to this.
I just tried downloading a fresh “Blog Site” skeleton, and installed the Comments plugin. The comments form shows up correctly, you might want to compare how the Antimatter theme loads it?
ok, i got it.
it seems the comments plugin is interpreting the enable_on_routes variable differently now.
i always had it as
enable_on_routes:
- '/blog'
(this is still the default currently)
changing it to
enable_on_routes:
- '/'
makes the comments re-appear
my interpretation:
in my system.yaml, i’m telling grav to hide the ‘/blog’ route in urls.
it would seem that after the grav update, this is also internally applied to the twig environment?
am i correct?