Skip to content
Grav 2.0 is officially stable. Read the announcement →
Archive

Call to a member function set() on null after upgrade to last version

Started by Muut Archive 11 years ago · 29 replies · 1901 views
11 years ago

Hi
i have this error message now when i want to go on back after last update
http://grav.en-toutes-lettres.fr/admin
Web site work in front but I cannot go on back now
I have tried bin/gpm update and i have this message

TXT
Fatal error: Call to a member function set() on a non-object in /homepages/22/d294493844/htdocs/grav/system/src/Grav/Common/GPM/Local/ AbstractPackageCollection.php on line 12
Whoops\Exception\ErrorException: Call to a member function set() on a non-object in file /homepages/22/d294493844/htdocs/grav/system/src/Grav/Common/GPM/Local/ AbstractPackageCollection.php on line 12
Stack trace:
  1. () /homepages/22/d294493844/htdocs/grav/system/src/Grav/Common/GPM/Local/ AbstractPackageCollection.php:12

take care

11 years ago

That's an odd one. Try this:

BASH
bin/gpm update -f
11 years ago

same fatal error

TXT
Fatal error: Call to a member function set() on a non-object in /homepages/22/d294493844/htdocs/grav/system/src/Grav/Common/GPM/Local/ AbstractPackageCollection.php on line 12
Whoops\Exception\ErrorException: Call to a member function set() on a non-object in file /homepages/22/d294493844/htdocs/grav/system/src/Grav/Common/GPM/Local/ AbstractPackageCollection.php on line 12
Stack trace:
  1. () /homepages/22/d294493844/htdocs/grav/system/src/Grav/Common/GPM/Local/ AbstractPackageCollection.php:12

i try to reinstall admin

TXT
gpm install admin

same thing

11 years ago

I'm having the same problem: Call to a member function set() on null on AbstractPackageCollection.php

11 years ago

Are you guys behind a proxy or a firewall of any kind?

11 years ago

I'm not behind anything. How does AbstractPackageCollection relate to the admin panel?

11 years ago

Nothing from my side too
I have two Grav sites on the same Webhost. One was upgrade to RC5 with this current fatal error. The second always in v1.0.0-rc.4 work without any issue. for info pb is only to go to admin, back, both sites are ok on front

PHP
Open: /homepages/22/d294493844/htdocs/grav/system/src/Grav/Common/GPM/Local/ AbstractPackageCollection.php
use Grav\Common\GPM\Common\AbstractPackageCollection as BaseCollection;

abstract class AbstractPackageCollection extends BaseCollection
{
    public function __construct($items)
    {
        foreach ($items as $name => $data) {
            $data->set('slug', $name);
            $this->items[$name] = new Package($data, $this->type);
        }

above code snippet where error was thrown

11 years ago

I'm really not sure what this is! I'll continue to investigate though.

11 years ago

its for me the same. I work with xampp, win8.1.

11 years ago

clearing the cache manually (delete content of /cache folder), seems to be one solution

11 years ago

Does clearing cache sort it for you too @tramber91 ?

11 years ago

As described there I have cleared the cache-directory in root, admin does still not work. Interesting fact is, if you are updating via admin backend you everything works fine. If you are installing new plugins via cli then there are errors. But if you are doing a simple selfupgrade at first it works like a charm.

11 years ago

Had the same issue. Appeared not exactly after update core but when i tried to install some plugins via cli. The only solution for me was restore from backup, update once again. This time via admin. Maybe there is problem with windows oriented envirorment and : / ; ?

11 years ago

I'm also having this issue. I've tried installing the latest version of both Grav and the Admin panel to no avail.

When trying to run index as an SSH command I get this

TXT
grav]$ php bin/gpm index                                                                                                                                                                                                    
PHP Fatal error:  Call to a member function set() on a non-object in /home/rdewar/public_html/grav/system/src/Grav/Common/GPM/Local/Abstrac tPackageCollection.php on line 12                                                                  
Whoops\Exception\ErrorException: Call to a member function set() on a non-object in file /home/rdewar/public_html/grav/system/src/Grav/Common/GPM/Local/Abstrac tPackageCollection.php on line 12                                              
Stack trace:                                                                                                                                                                                                                                   
  1. () /home/rdewar/public_html/grav/system/src/Grav/Common/GPM/Local/Abstrac tPackageCollection.php:12 

Any ideas on how to fix this without rolling back to a previous version?

11 years ago

@Peter, try a bin/grav clear --all and see if that helps the situation.

11 years ago

Can one of you guys who are having this problem perhaps zip up your site and drop it on dropbox, then PM me the link to download it? I would like to try to recreate this as I can't on my own setups.

11 years ago

@rhukster unfortunately the issue still seems to be there. Still getting

TXT
Whoops\Exception\ErrorException thrown with message "Call to a member function set() on a non-object"

Stacktrace:
#0  in /home/rdewar/public_html/grav/system/src/Grav/Common/GPM/Local/Abstrac tPackageCollection.php:12

In SSH for bin/gpm index and

TXT
Whoops\Exception\ErrorException thrown with message "Call to a member function set() on a non-object"

Stacktrace:
#0  in /home/rdewar/public_html/grav/system/src/Grav/Common/GPM/Local/Abstrac tPackageCollection.php:12

In admin.

Am zipping up a copy of the site for you now. Will PM you the details.
Pete

11 years ago

Thanks. I'll take a look but one other thing to try if you could:

Install a new core grav install on the same server in another location, and see if you have the same problem there? That would help isolate if its a code issue or a server issue. Thanks!

11 years ago

I have the same issue with a clear install, directly at login, on a personnal server (Synology) but after uploading on a online server there is no error, so it looks like a server issue.

11 years ago

There are no other errors in your PHP error log?

Suggested topics

Topic Participants Replies Views Activity
Archive · by Deleted User, 9 years ago
0 1350 9 years ago
Archive · by Muut Archive, 9 years ago
2 935 9 years ago
Archive · by Muut Archive, 9 years ago
2 4061 9 years ago
Archive · by Muut Archive, 9 years ago
1 2948 9 years ago
Archive · by Muut Archive, 9 years ago
3 1119 9 years ago