In this tutorial we will go over some common issues run into when making a theme work on Concrete CMS version 9.
Some of these issues are technical, and some are the result of changes in PHP 8 or misconceptions that all new themes must run on Bedrock. This will be a living document that will include more pointers as they are contributed by the community.
Question: Why am I getting errors like "PHP Fatal error: Uncaught Error: Unknown named parameter"?
Answer: In PHP 8 there are some backwards incompatible changes. One of the most common issues is code attempting to access non-existent variables or properties. This used to be possible in PHP 7 without throwing an error, but in PHP 8 it throws an error. You will likely see an error that looks like this:
PHP Fatal error: Uncaught Error: Unknown named parameter
Basically this means you need to find the spot in the code where you are trying to access a variable that doesn't exist and make sure the variable or property exists before you try to interface with it or evaluate it.
A lot of the pain that theme and addon developers run into can be the result of new requirements in PHP 8, so it's a good idea to familiarize yourself with the backwards incompatible changes in PHP 8:
Question: Do I need to build my theme using Bedrock?
Answer: Nope! You do not need to make your theme use Bedrock in order to be Concrete version 9 compatible.
Question: Why is my file picker not working in my block edit interface anymore?
Answer: Some popular addons implemented the file picker in v8 using methods that were migrated in v9, which resulted in some blocks generated with those addons having file picker issues. For instance, the Block Designer, which allows users to make custom blocks, ran into this issue but has since been updated. So you may need to update your own custom addons or reach out to the developer of your favorite addon to update file picker interfaces.
Question: Do I have to update my theme / site to PHP 8?
Bookmark this article, as there will be more tips to come for Concrete theme and addon developers!