I’m running a fresh install of grav with the quark theme. I use the blog item. Grav is running fine. I tried several times to install the comment plugin always with the result of not showing up on my pages.
My page configuration:
Main Page
/blog -> blog
Blog Entry 1
/blogentry1 -> item
Blog Entry 2
/blogentry2 -> item
The content of my comments.yaml in user/config/plugins:
enabled: true
enable_on_routes:
- /blog
- /item
- /blog
- /item
disable_on_routes:
- /blog/blog-post-to-ignore
- /ignore-this-route
form:
name: comments
fields:
-
name: name
label: PLUGIN_COMMENTS.NAME_LABEL
placeholder: PLUGIN_COMMENTS.NAME_PLACEHOLDER
autocomplete: true
type: text
validate:
required: true
-
name: email
label: PLUGIN_COMMENTS.EMAIL_LABEL
placeholder: PLUGIN_COMMENTS.EMAIL_PLACEHOLDER
type: email
validate:
required: true
-
name: text
label: PLUGIN_COMMENTS.MESSAGE_LABEL
placeholder: PLUGIN_COMMENTS.MESSAGE_PLACEHOLDER
type: textarea
validate:
required: true
-
name: date
type: hidden
process:
fillWithCurrentDateTime: true
-
name: title
type: hidden
evaluateDefault: grav.page.header.title
-
name: lang
type: hidden
evaluateDefault: grav.language.getLanguage
-
name: path
type: hidden
evaluateDefault: grav.uri.path
buttons:
-
type: submit
value: PLUGIN_COMMENTS.SUBMIT_COMMENT_BUTTON_TEXT
process:
-
email:
subject: PLUGIN_COMMENTS.EMAIL_NEW_COMMENT_SUBJECT
body: '{% include ''forms/data.html.twig'' %}'
-
addComment:
-
message: PLUGIN_COMMENTS.THANK_YOU_MESSAGE
-
reset: true
The contents of user/themes/quark/templates/partials/blog-item.html.twig:
GNU nano 2.9.3 blog-item.html.twig
<div class="content-item h-entry">
{% if not hero_image_name %}
<div class="content-title text-center">
{% include 'partials/blog/title.html.twig' with {title_level: 'h2'} %}
{% if page.header.subtitle %}
<h3 >{{ page.header.subtitle }}</h3>
{% endif %}
{% include 'partials/blog/date.html.twig' %}
{% include 'partials/blog/taxonomy.html.twig' %}
</div>
{% endif %}
<div class="e-content">
{{ page.content|raw }}
</div>
{% if page.header.continue_link is same as(true) and config.plugins.comments.enabled %}
{% include 'partials/comments.html.twig' %}
{% endif %}
</div>
<p class="prev-next text-center">
{% if not page.isLast %}
<a class="btn" href="{{ page.prevSibling.url }}"><i class="fa fa-angle-left"></i> {{ 'THEME_QUARK.BLOG.ITEM.PREV_POST'|t }}</a>
{% endif %}
{% if not page.isFirst %}
<a class="btn" href="{{ page.nextSibling.url }}">{{ 'THEME_QUARK.BLOG.ITEM.NEXT_POST'|t }} <i class="fa fa-angle-right"></i></a>
{% endif %}
</p>
I’ve spent several hours trying different settings, but i can’t get the comment section to show up. On the other hand i can’t get the grav frontend to crash either. It seems the comment plugin isn’t active at all (allthough it is set to enabled).