Upgrading from Fuel v1.1 to v1.4.3

I'm trying to upgrade a v1.1 Fuel project to v1.4.3 (so it can now run on PHP7) and it's proving tough going. I've upgraded the SQL, and tried to merge as much as I can (the base v1.1 project has numerous advanced modules and simple models), and have capitalised classes, updated references to Base_module_model but I'm getting many errors that are proving difficult.

The home page works just fine, but any other page I get, for example errors like:
<br /> Message: Undefined index: fuel</p> <p>Filename: libraries/Fuel.php</p> <p>Line Number: 123<br /> ...<br /> Message: array_merge(): Argument #2 is not an array</p> <p>Filename: libraries/Fuel.php</p> <p>Line Number: 126<br /> ...<br /> Message: Invalid argument supplied for foreach()</p> <p>Filename: libraries/Fuel.php</p> <p>Line Number: 129<br /> ...<br /> Message: in_array() expects parameter 2 to be array, null given</p> <p>Filename: libraries/Fuel.php</p> <p>Line Number: 477<br /> ...<br /> Message: Undefined property: Fuel::$modules</p> <p>Filename: libraries/Fuel.php</p> <p>Line Number: 481<br /> ...<br /> Message: Call to a member function allowed() on null</p> <p>Filename: /var/www/public/fuel/modules/fuel/libraries/Fuel.php</p> <p>Line Number: 481<br />

The traces go from the index.php to /var/www/public/fuel/modules/fuel/core/MY_Hooks.php to /var/www/public/fuel/modules/fuel/hooks/Fuel_hooks.php
to /var/www/public/fuel/modules/fuel/helpers/MY_url_helper.php to /var/www/public/fuel/modules/fuel/libraries/Fuel.php in many cases.

Can anyone provide advice?

Comments

  • Have you read the area for upgrading to FUEL 1.4 here?
    http://docs.getfuelcms.com/installation/installing

    In particular the command line tool that will help with a lot of the issues you run into including the casing and the changes needed for many of the simple modules:
    php index.php fuel/installer/update

  • edited April 2019

    I used the Git merge option from guide, but I think the manual option may be better. I'm using a MY_Controller for some, but not all, controllers. For regular CI controllers, more works than not, but referring to the Fuel object in MY_Controller (to retrieve & render fuel pages) seems to result in a NULL Fuel object. Likewise, any purely CMS pages have the same breakdown.

    I can't run the update tool since that also breaks, with many of the same errors.

    I can't figure why that is, so what I will do is work, "inside out" and try avoiding the MY_Controller as it is, and see how far I get with the rest of the site.

  • edited April 2019

    Nailed it I think - there was a config of "fuel" being autoloaded. It didn't cause a problem in Fuel v1.1 but it created mayhem in v1.4.3!!

Sign In or Register to comment.