Fatal Error Block::getInstance

Permalink 1 user found helpful
Fatal error: Block::getInstance() [<a href='block.getinstance'>block.getinstance</a>]: The script tried to execute a method or access a property of an incomplete object. Please ensure that the class definition &quot;HtmlAudioBlockController&quot; of the object you are trying to operate on was loaded _before_ unserialize() gets called or provide a __autoload() function to load the class definition in /home7/thealcke/public_html/concrete/models/block.php on line 328

^^^^ This appeared when I uninstalled an add-on and now I am unable to access the website/login. Please, help!

 
mberkom replied on at Permalink Reply
Bump!

I'm running into the same issue while trying to develop a custom package for sermon uploads. I've uninstalled/reinstalled the package several times and still get:

Fatal error: Block::getInstance() [<a href='block.getinstance'>block.getinstance</a>]: The script tried to execute a method or access a property of an incomplete object. Please ensure that the class definition &quot;AutonavBlockController&quot; of the object you are trying to operate on was loaded _before_ unserialize() gets called or provide a __autoload() function to load the class definition in C:\xampp\vhosts\cws.int.devcsd.com\concrete\models\block.php on line 328


This is without me even having started working on the front end block. Right now, I've just been developing the admin interface...
phpsoftsol replied on at Permalink Reply
phpsoftsol
Hi i had same problem.
Solution is that just uninstal your theme one time and activate another theme and after that you have activate your theme.
Then you got the solution

thanks
http://www.phpsoftsol.in
phpsoftsol replied on at Permalink Reply
phpsoftsol
Hi i had same problem.
Solution is that just uninstal your theme one time and activate another theme and after that you have activate your theme.
Then you got the solution

thanks
http://www.phpsoftsol.in
rchen replied on at Permalink Reply
how do I uninstall the theme when I can't login
Mnkras replied on at Permalink Reply
Mnkras
site.com/index.php/dashboard
Sergefactor replied on at Permalink Reply
Sergefactor
I had this same type of hiccup after I purchased a gallery addon. The reset your site trick worked for me as well.
playhouse replied on at Permalink Reply
Im Having same issue. But i get the error even trying to access the dashboard.
jb1 replied on at Permalink Reply
jb1
I had the same problem, and found a workaround, so this might help someone else.

It seems to be related to the cache feature. By simply running the upgrade script, it will clear the cache. Here's instructions on how to run the upgrade script:
http://www.concrete5.org/documentation/installation/upgrading_concr...

Go tohttp://www.yoursite.com/index.php/tools/required/upgrade... (Note: if this does not work, tryhttp://www.yoursite.com/index.php/tools/required/upgrade.php)...

Hope this helps someone.

JB
jb1 replied on at Permalink Reply
jb1
And if any developers are looking for a permanent fix, I found one.

Add the following to your package's controller.php file:
public function uninstall(){
   Cache::flush(); //remove items from cache
   return parent::uninstall(); 
}


This will automatically run when the package is uninstalled and clears the C5 cache just beforehand. So there's no more nasty error.
paritosh46 replied on at Permalink Reply
Thank you! Adding the uninstall function solved the problem.