Upgrading to Joomla4

Now, let's get a bit to the Front End since we do have still errors here and there. The error that is now shining on us stating Unknown column 'm.publish_up' in 'where clause' is again related to a missing column in a table. This means that are update went so badly that not all SQL queries went as they were intended. Caused again by extensions. This missing column refers to the ar_menu table where two columns are missing, see below. You can add them using the SQL queries listed below one by one. After adding these missing columns, voila, at least some error on the Front Page related to some code issue with Joomla 4 rather than an issue with the database.

ALTER TABLE `ar_menu` ADD `publish_up` DATETIME;
ALTER TABLE `ar_menu` ADD `publish_down` DATETIME;

Since we have only a code error on the Front End, let's come back to the Back End. It seems that there is still some error after choosing a specific function within the Back End related to the "attachment" extension but what is bothering me more is the missing template of the Back End. It looks like it is without any CSS or anything. This means that a lot was missed during the upgrade. At this moment I would most likely start over and think twice if to keep the unsupported extensions and just uninstall them, however, we are here to solve the issue or at least to try to solve it since it can happen. If we look at how the Back End is looking it may point us to a missing template, and thus let's get back to phpMyAdmin and look at ar_template_styles table. Now, we can see that we are missing the new templates that come with Joomla 4 and are stuck with the old ones. What we would expect is the atum and cassiopeia template. Physically I see them in the appropriate folders but no entry what so over.

Now we know the templates are missing and thus let's bring them back. The SQL query below will add new entries within the ar_template_styles table with ID 10 and ID 11. Make sure these IDs are not occupied. Keep everything as it is for now. Looking at the tables, yes, I have a fresh copy of Joomla 4 next to this instance to see what is missing, I see that we miss another table in the database structure called ar_template_overrides. Let's add it as well with the SQL query below. To load the Back End template I had to change the client_id and home values from 1 to 0 within phpMyAdmin - ar_template_styles by the isis template and add these values to atum.

INSERT INTO `ar_template_styles` (`id`, `template`, `client_id`, `home`, `title`, `inheritable`, `parent`, `params`) VALUES
(10, 'atum', 1, '1', 'Atum - Default', 1, '', '{\"hue\":\"hsl(214, 63%, 20%)\",\"bg-light\":\"#f0f4fb\",\"text-dark\":\"#495057\",\"text-light\":\"#ffffff\",\"link-color\":\"#2a69b8\",\"special-color\":\"#001b4c\",\"monochrome\":\"0\",\"loginLogo\":\"\",\"loginLogoAlt\":\"\",\"logoBrandLarge\":\"\",\"logoBrandLargeAlt\":\"\",\"logoBrandSmall\":\"\",\"logoBrandSmallAlt\":\"\"}'),
(11, 'cassiopeia', 0, '1', 'Cassiopeia - Default', 1, '', '{\"brand\":\"1\",\"logoFile\":\"\",\"siteTitle\":\"\",\"siteDescription\":\"\",\"useFontScheme\":\"0\",\"colorName\":\"colors_standard\",\"fluidContainer\":\"0\",\"stickyHeader\":0,\"backTop\":0}');
CREATE TABLE `ar_template_overrides` (
  `id` int(10) UNSIGNED NOT NULL,
  `template` varchar(50) NOT NULL DEFAULT '',
  `hash_id` varchar(255) NOT NULL DEFAULT '',
  `extension_id` int(11) DEFAULT 0,
  `state` tinyint(4) NOT NULL DEFAULT 0,
  `action` varchar(50) NOT NULL DEFAULT '',
  `client_id` tinyint(3) UNSIGNED NOT NULL DEFAULT 0,
  `created_date` datetime NOT NULL,
  `modified_date` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; 
ALTER TABLE `ar_template_overrides`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_template` (`template`),
  ADD KEY `idx_extension_id` (`extension_id`);
ALTER TABLE `ar_template_overrides` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;

Popular