Updating site from 8.5.13 to current version of 9

I am working on a strategy to get my site up to version 9 and Php 8. It is currently on Version 8.5.13 and Php 7.4 . The first step looks like I should update the site from 8.5.13 to the most stable version of 9 and stay on Php 7.4 .

To do that I want to understand what can break. I have 15 custom blocks. The blocks retrieve information from a proprietary database, create interactive maps using leaflet and present photo galleries. The galleries blocks call a .js script.

The controllers currently use the following:

use Concrete\Core\Block\BlockController;
use Concrete\Core\Page\Page;
use Core;
use Database;
use Config;

I am trying to figure out what changes with blocks when you move sites to version 9. I have seen there is a problem with images but can’t really find any other information in the documentation or this forum talking about other know problems. Has anyone updating a site running custom blocks run into any other problems?

After getting the site updated to Version 9 the next task is to upgrade the site to use PHP 8. Are there recommendations for any PHP utilities that will scan php version 7.4 file to point out incompatibilities?

My final problem upgrading to PHP 8 involves my theme. It is a theme I purchased from the Market Place. It is my understanding the the developer of the theme is not maintaining the theme any longer and will not update it to Version 9. Can I update the theme myself to version 9 or is that a problem? (I also understand that I will need to make some CSS changes to make the dashboard more readable.)

All this work will be done with a complete copy of the site on a development server.

Any suggestions or information about known problems is sincerely appreciated.

Moving from v8 to v9 your custom blocks should be fine, there weren’t major breaking changes there. One exception is if you’re using core assets - many of them are gone. Another thing is if you use the image helper you need to switch from $img = Core::make('html/image', [$thumbnail]); to $img = Core::make('html/image', ['f' => $thumbnail]);.

When going to PHP8 you’re going to run into more things. Basically every block needs to have the form values passed in from the controller and if you use $this->xxx in the controller xxx has to be defined.

The theme is most likely going to be fine too. v9 still supports the Bootstrap3 grid framework so not much will need to change there other than any PHP8 related items.

Thank you Hutman. Is there documentation telling me if I used core asset Database, what replaces that core asset in V9? I could not find anything in the documentation, but maybe I was searching in the wrong place.

Unfortunately there is not. If you look in the concrete/config/app.php it lists the available assets and asset groups, but that’s about the only way short of watching the Logs and seeing if your site works when logged out.

Evan’s tutorial may help you

Thank you. I missed that tutorial. Appreciate your help.

You might have some JavaScript errors because Concrete v9 uses a version of jQuery that is not entirely backward compatible with the one used by v8.

Your theme will most likely use an older version of the Bootstrap CSS framework. You’ll either need to update it and make quite a few modifications to work with the newer Bootstrap. Or keep using the older version and make sure it doesn’t interfere with Concrete’s interface.

Good to know about the Javascript issues. This I will keep with the old version of bootstrap and fix the interface. I have seen previous posts talking about how to fix that problem, which primary has to do with font sizes, I believe. Thank you.

Not only. the class names to align right and left have changed for instance. A few others too but that’s not the hardest.

Oh and Font Awesome, if you use it, several icons changed name.

Once I am done I will try to put together a document of the problems I found and how I solved them. Thanks again – it is helpful to know what to watch out for when correcting errors.

One last question. Can I update from 8.5.13 directly to the current version of concrete – 9.5.9 or do I need to go through intermediary steps? Does anyone know? Maybe I should not be updating to the most recent version 9?

Sorry, late answer.
I always went from latest v8 to latest v9 and never had a problem with the core itself.