getgrav / getgrav/grav-plugin-comments

[Error] Creating default object from empty value

Open
#78 5 comments 0 reactions 0 assignees View on GitHub
cannot recreate
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 :

![2019-03-29_00h43m09s_chrome](https://user-images.githubusercontent.com/22033256/55199850-c8bbdd00-51bb-11e9-99bf-9fa76699f70a.jpg)

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.