kalebheitzman / grav-plugin-datetools

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

exception after upgrade to grav 1.1.1 #7

Closed gigago closed 8 years ago

gigago commented 8 years ago

Issue: exception in datetools.php after upgrade from grav 1.0.10 to grav 1.1.1. Reason: data member grav config not initialized. Description: Exception occurs after upgrading to grav 1.1.1, updating plugins and clearing the cache. Reproducible: 100%.

/Library/WebServer/Documents/ami/user/plugins/datetools/classes/datetools.php

    /**
     * Construct
     */ 
    public function __construct()
    {
        // get the config
        $this->config = self::$grav['config'];
        // date format
        $this->dateFormat = $this->config->get('plugins.datetools.dateFormat.default');
        // get today
        $this->now = $this->now();

        // initialize processing vars
        $this->initProcessingVars();

        // initialize common dates
        $this->initCommonDates();
    }

Arguments
"Call to a member function get() on a non-object"
iskrisis commented 8 years ago

I have the same issue.

LostInInaka commented 8 years ago

See this previous issue for some information why you probably won't get updates if you download the version directly from the grav downloads website (something to do with the placement of the "v" for the version number)

Instead, backup/delete the old version (v1.0.1) and download the newest release directly from this repo and drop it in your user/plugins folder.

Warning: Do not leave the old version in this folder or it will get picked up as a plugin!

Set permissions (and rename the folder if you like), and it should pick up perfectly!

iskrisis commented 8 years ago

Yes sorry you are right. But it is strange, it does this everytime when downloaded with bin/gpm. What makes this worse that when using package manager, this plugin is installed as dependency of Events plugin, which will be used probably by quite few people.

kalebheitzman commented 8 years ago

Deleted tags that start with v to remedy this issue. Sorry about the confusing. I'll be pushing 1.0.6 tonight.