getgrav / grav-plugin-comments

Grav Comments Plugin
http://getgrav.org
55 stars 28 forks source link

[Error] Creating default object from empty value #78

Open Heraes-git opened 5 years ago

Heraes-git commented 5 years ago

Having freshly installed and configured the plugin (copied the yaml in /config/plugin), I have this critkey error :

2019-03-29_00h43m09s_chrome

My setup is :

{% 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} %}
    </{{ tag }}>
{% endblock %}

I enabled the plugin for the pages :

enable_on_routes:
  - '/blog'
  - '/critiques'
  - '/commentaires'
rhukster commented 5 years ago

I'm not familiar with this plugin as Flavio wrote it. When Grav 1.6 is released, we can go back and see about fixing issues on it. Sorry for the delay.

mahagr commented 5 years ago

To me, it looks like $header could be null.

Heraes-git commented 5 years ago

@rhukster A big thank you for the quick answer. I thought the plugin was abandoned, but I see that there's still people involved on it (and this is important, given the utility of this plugin). I will be patient. ;) For now, I think I'm gonna disable the plugin and wait for a fix.

lou-diamonds commented 5 years ago

@rhukster Now that Grav 1.6 is out, can the team take a look at this plugin? I'd like to use it, but it seems like many are having issues because it's outdated.

rhukster commented 4 years ago

I'm testing this with 1.6 and 1.7 and PHP 7.4 and don't see this error any more.