Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Error] Creating default object from empty value #78

Open
Heraes-git opened this issue Mar 28, 2019 · 5 comments
Open

[Error] Creating default object from empty value #78

Heraes-git opened this issue Mar 28, 2019 · 5 comments

Comments

@Heraes-git
Copy link

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 :

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

I enabled the plugin for the pages :

enable_on_routes:
  - '/blog'
  - '/critiques'
  - '/commentaires'
@Heraes-git Heraes-git changed the title Creating default object from empty value Critkey ! Creating default object from empty value Mar 28, 2019
@Heraes-git Heraes-git changed the title Critkey ! Creating default object from empty value Crikey! Creating default object from empty value Mar 28, 2019
@Heraes-git Heraes-git changed the title Crikey! Creating default object from empty value [Error] Creating default object from empty value Mar 28, 2019
@rhukster
Copy link
Member

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
Copy link
Member

mahagr commented Mar 29, 2019

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

@Heraes-git
Copy link
Author

@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
Copy link

@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
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants