kalebheitzman / grav-plugin-datetools

This plugin provides date tools to twig inside of Grav CMS.
MIT License
1 stars 1 forks source link

self::$grav is undefined #2

Closed loganfreeman closed 8 years ago

loganfreeman commented 8 years ago

$this->config = self::$grav['config'];

Vivalldi commented 8 years ago

@loganfreeman I also have this issue. It seems to appear only in production environments for me. the plugin works fine in localhost development though in production it fails

@kalebheitzman I would take a look at how other plugins call grav and it's config

kalebheitzman commented 8 years ago

@Vivalldi are there any plugins you would recommend specifically that I look at? Thanks.

Vivalldi commented 8 years ago

So the grav object is a protected attribute of the plugin class. So in the login plugin it calls $this->grav['config'] which calls the config container

daz3dpr0z commented 8 years ago

I have just installed datetools as it was required by the event plugin. Then on loading my site after the install it appears i also have a similar issue

Access to undeclared static property: Grav\Plugin\DateTools::$grav

It seems to throw the error at the following point in the datetools.php

$this->config = self::$grav['config'];

I can set enabled: false in the .yaml file and my site works again .

Perhaps i should have opened another thread for this issue. if so let me know and i will create a new one.

regards jimmy

kalebheitzman commented 8 years ago

This is fixed with v1.0.3. Pushing the release today.