J4.x

Upgrade to 4.0 Beta 4

From Joomla! Documentation

Upgrading from 3.10 alpha or 4.0 upto beta 3 will cause SQL errors on your site

Errors reported

Versions affected

General Information

This pertains only to Joomla! DEVELOPMENT version(s): 3.10.0-alpha, 4.0.0-beta3 (and previous Joomla 4 development versions)

What is the cause

This was caused by the the decision to add back the custom data field to Joomla 4 due to developer feedback as well as the merging of some preparatory SQL code for a Joomla 4.1 feature

How to fix

Run the following SQL commands on your Joomla database if you are using a MySQL or MariaDB database:

ALTER TABLE `#__extensions` ADD COLUMN `custom_data` text NOT NULL;
ALTER TABLE `#__template_styles` ADD COLUMN `inheritable` tinyint(1) NOT NULL DEFAULT 0;
ALTER TABLE `#__template_styles` ADD COLUMN `parent` varchar(50) DEFAULT '';

or for PostgreSQL:

ALTER TABLE "#__extensions" ADD COLUMN "custom_data" text NOT NULL;
ALTER TABLE "#__template_styles" ADD COLUMN "inheritable" smallint NOT NULL DEFAULT 0;
ALTER TABLE "#__template_styles" ADD COLUMN "parent" character varying(50) DEFAULT '';

Replace "#__" by your database prefix (see Global Configuration) before running the statements.

Depending on the Joomla version before the update, some statement might fail because the particular database column already exists. In this case ignore that and continue with the next statement.

To avoid the issue you should run the statements before the update to 4.0 Beta 4.

Otherwise, if you already have updated, use the statements after the update to fix the issue.