getgrav / getgrav/grav-plugin-comments
[Error] Creating default object from empty value
- Dominant language
- PHP
- Stars
- 54
- Forks
- 26
- PR merge metrics
- No merged PRs in 30d
Description
Having freshly installed and configured the plugin (copied the yaml in /config/plugin), I have this critkey error :

My setup is :
- A regular page "_commentaires.fr.md_" with, in frontmatter :
```
---
title: Commentaires
visible: true
---
```
- A template _commentaires.html.twig_, with :
```
{% extends 'partials/base.html.twig' %}
{% block content %}
{% set tag = page.header.user_htmltag|defined('div') %}
<{{ tag }} class="{{ page.header.user_classes }}">
{{ page.content }}
{% include 'partials/comments.html.twig' with {'page': page} %}
{% endblock %}
```
I enabled the plugin for the pages :
```
enable_on_routes:
- '/blog'
- '/critiques'
- '/commentaires'
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Reproduce the error with the /config/plugin YAML, the _commentaires.fr.md frontmatter, and commentaires.html.twig, including the enable_on_routes entries. Start by checking the template's use of page.header values and the included partials/comments.html.twig; done means the comments page renders without the reported error, although the issue does not specify the intended fix.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- web-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 28/100