help to better help you:

Please: add always Joomla / JEM version and details to your posts, so we can try to reproduce your issue!

Unknown column 'a.color' in field list

Unknown column 'a.color' in field list

1 month 1 week ago
#33858
I've upgraded my Joomla to Version 5.25 and JEM to 4.4.2.
But when I try to open the list of venues, I always get the error message "unknown column a.color in field list".
I've checked the structure of the table jos_jem_venues and found no field a.color there. 

What can I do to repair the database?

Best regard
hike39

Please Log in or Create an account to join the conversation.

Re: Unknown column 'a.color' in field list

1 month 1 week ago
#33859
This is old issue and it's solved.
See the script to repair in: github.com/jemproject/JEM-Project/issues/2092

If you want to test the next version JEM:

JEM 5.0.0 rc2 for Joomla 6:
[github.com/jemproject/JEM-Project/blob/JEM-5.0.0-dev-beta1-from-4.5.0/pkg_jem_v5.0.0rc2.zip]( github.com/jemproject/JEM-Project/blob/JEM-5.0.0-dev-beta1-from-4.5.0/pkg_jem_v5.0.0rc2.zip )

JEM 4.5.0 rc2 for Joomla 5:
[github.com/jemproject/JEM-Project/blob/JEM-4.5.0-dev-bugfix-newfeatures/pkg_jem_v4.5.0rc2.zip]( github.com/jemproject/JEM-Project/blob/JEM-4.5.0-dev-bugfix-newfeatures/pkg_jem_v4.5.0rc2.zip )

This is a JEM Release Candidate. It will be launched this month (next update).

Please Log in or Create an account to join the conversation.

Re: Unknown column 'a.color' in field list

1 month 1 week ago
#33869
Is there a list which columns JEM requires for venues? Because now I've added a column for color. But now I got the error message for missing the column recurrence_bylastday.
It's a little bit frustrating to stumble for one missing column to the next.
I've already checked the database for JEM. Result: No problem

Please Log in or Create an account to join the conversation.

Re: Unknown column 'a.color' in field list

1 month 1 week ago - 1 month 1 week ago
#33870
just wondering: what version of JEM did you had before upgrading to 4.4.2?

This is sql for venues.   
CREATE TABLE IF NOT EXISTS `#__jem_venues` (`id` int(11) unsigned NOT NULL auto_increment,`venue` varchar(100) NOT NULL DEFAULT '',`alias` varchar(100) NOT NULL DEFAULT '',`color` varchar(7) NOT NULL DEFAULT '',`url` varchar(200) NOT NULL DEFAULT '',`street` varchar(50) DEFAULT NULL,`postalCode` varchar(20) DEFAULT NULL,`city` varchar(50) DEFAULT NULL,`state` varchar(50) DEFAULT NULL,`country` varchar(2) DEFAULT NULL,`latitude` decimal(10,6) DEFAULT NULL,`longitude` decimal(10,6) DEFAULT NULL,`locdescription` mediumtext DEFAULT NULL,`meta_keywords` text DEFAULT NULL,`meta_description` text DEFAULT NULL,`locimage` varchar(100) NOT NULL DEFAULT '',`map` tinyint(4) NOT NULL DEFAULT '0',`created_by` int(11) unsigned NOT NULL DEFAULT '0',`author_ip` varchar(80) NOT NULL DEFAULT '',`created` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,`modified` datetime NULL DEFAULT NULL,`modified_by` int(11) unsigned NOT NULL DEFAULT '0',`version` int(11) unsigned NOT NULL DEFAULT '0',`published` tinyint(1) NOT NULL DEFAULT '0',`checked_out` int(11) UNSIGNED NULL DEFAULT NULL,`checked_out_time` datetime NULL DEFAULT NULL,`ordering` int(11) NOT NULL DEFAULT '0',`publish_up` datetime NULL DEFAULT NULL,`publish_down` datetime NULL DEFAULT NULL,`access` int(10) UNSIGNED NOT NULL DEFAULT '1',`custom1` varchar(200) NOT NULL DEFAULT '',`custom2` varchar(200) NOT NULL DEFAULT '',`custom3` varchar(100) NOT NULL DEFAULT '',`custom4` varchar(100) NOT NULL DEFAULT '',`custom5` varchar(100) NOT NULL DEFAULT '',`custom6` varchar(100) NOT NULL DEFAULT '',`custom7` varchar(100) NOT NULL DEFAULT '',`custom8` varchar(100) NOT NULL DEFAULT '',`custom9` varchar(100) NOT NULL DEFAULT '',`custom10` varchar(100) NOT NULL DEFAULT '',`attribs` varchar(5120) DEFAULT NULL,`language` char(7) NOT NULL DEFAULT '*',`type_id` int(11) unsigned NULL DEFAULT NULL,PRIMARY KEY (`id`),KEY `idx_access` (`access`),KEY `idx_checkout` (`checked_out`),KEY `idx_pubstate` (`published`),KEY `idx_createdby` (`created_by`),KEY `idx_language` (`language`),KEY `idx_type` (`type_id`)) ENGINE=InnoDB CHARACTER SET `utf8mb4` COLLATE `utf8mb4_unicode_ci`


The field recurrence_bylastday is located in jem_events table and was added in 4.3.3
Code:
UPDATE `#__jem_config` SET value = JSON_SET(value,'$.global_editevent_starttime_limit', '0', '$.global_editevent_endtime_limit', '23', '$.global_editevent_minutes_block', '1') WHERE keyname = 'globalattribs';INSERT IGNORE INTO `#__jem_config` (`keyname`, `value`, `access`) VALUES ('recurrence_anticipation_lastday', '60', '0');ALTER TABLE `#__jem_events` ADD `recurrence_bylastday` VARCHAR(20) NULL DEFAULT NULL AFTER `recurrence_byday`;ALTER TABLE `#__jem_events` ADD `publish_down` DATETIME NULL DEFAULT NULL AFTER `modified_by`;ALTER TABLE `#__jem_events` ADD `publish_up` DATETIME NULL DEFAULT NULL AFTER `modified_by`;INSERT INTO `#__jem_config` (`keyname`, `value`, `access`) VALUES ('categories_order', '0', '0');INSERT INTO `#__jem_config` (`keyname`, `value`, `access`) VALUES ('defaultCategory', '0', '0');INSERT INTO `#__jem_config` (`keyname`, `value`, `access`) VALUES ('defaultVenue', '0', '0');-- change values


 
Joomla5, Joomla 6.1.1 || JEM
Last edit: 1 month 1 week ago by Bluefox.

Please Log in or Create an account to join the conversation.

Re: Unknown column 'a.color' in field list

1 month 1 week ago
#33871
This error usually means that the JEM files and the JEM database schema are not in the same state.

In JEM 4.4.2 the venues list expects the column `color` in the table `#__jem_venues` (`a.color` is the alias used by the venues query). That column is added by the JEM database update script, so if it is missing after upgrading to JEM 4.4.2, the database structure update was probably not applied completely.

Please try this first:

1. Make a backup of the site and database.
2. Go to Joomla Administrator: System -> Maintenance -> Database
3. Filter/search for `JEM`.
4. Select the JEM entry if it is shown as not up to date.
5. Click `Update Structure` / `Fix`.
6. Clear Joomla cache and try opening:
Components -> JEM -> Venues

If the error is still there, please check whether the column exists in your database:

SHOW COLUMNS FROM `#__jem_venues` LIKE 'color';

Replace `#__` with your Joomla database prefix.

For JEM 4.4.2 the table `#__jem_venues` should contain a `color` column. If it does not, the schema update from JEM 4.4.0 was not applied. In that case, reinstalling the same JEM 4.4.2 package over the current installation, without uninstalling JEM, and then running the Joomla Database Fix again should normally repair the schema.

Do not uninstall JEM unless you have a verified backup, because uninstalling can remove extension data depending on the installation state.

Please Log in or Create an account to join the conversation.

Time to create page: 0.737 seconds