[Solved] Fatal Error on AutoNav block after upgrade 5.4.1

Permalink
Hello,

I'm getting a fatal error that's stopping my pages from loading after upgrading to 5.4.1. Here's the error:

Fatal error: Call to undefined method AutonavBlockItem::getTarget() in concrete\blocks\autonav\view.php on line 28

Anyone else seeing this or know what might be wrong?

I was running 5.3.3.1 previously. PHP 5.3.0 and IIS 7

Thank you in advance!

 
patej replied on at Permalink Best Answer Reply
patej
Sorry being a bit late, but I just experienced the same problem. Maybe this is of help to someone.

Reason for this problem is, that I had changed the default autonav-block a bit by creating a new template in /blocks/autonav, which overrides the core's autonav files. Creating templates is just fine, but I had for some reason (no idea anymore why) also the controller.php in /blocks/autonav. That got the system messed up because update to 5.4.1 obviously changed controller.php in the core as well, which your error message is referring to.

Solution was to remove the controller.php from /blocks/autonav. Same problem might appear if you have e.g. view.php there, which uses a function that has been changed in the core after update.
srs04 replied on at Permalink Reply
That was it! Thank you! I had a controller.php file in there for some reason as well. I have several templates I created, but I don't know why I had the controller file there.
Removing that file fixed the error.
jjram replied on at Permalink Reply
Anyone has solved this problem in some other way? I'm having the same issue getting this error after moving my site from localhost to server I tried this solution but it doesn't work for me , this the error I have:

Fatal error: Call to undefined method AutonavBlockController::getContentAndGenerate() in /home2/mysite/public_html/concrete/blocks/image/view.php on line 3