Joomla: Updates Table Doesn't Exist
One of our students was having a problem updating his site. The issue was the "updates" table in the database had become corrupted.
We found a solution for him, but it required running a query in phpMyAdmin. He wasn't familiar with the process of running a database query before, so we created this tutorial for him and you.
In the step-by-step tutorial, we'll describe the issue and demonstrate how to resolve it.
- Going to Components -> Joomla Update results in this error:
An error has occurred. 1146 Table `updates` doesn't exist SQL=SELECT DISTINCT update_site_id FROM #__updates WHERE `update_site_id` IN ( SELECT update_site_id FROM #__update_sites WHERE `last_check_timestamp` IS NULL OR `last_check_timestamp` <= '1493997061')
- Going to Extensions -> Manage -> Database results in this error:
Table 'updates' does not have column 'infourl'. (From file 2.5.0-2012-01-10.sql.) Table 'updates' should not have column 'categoryid'. (From file 3.0.0.sql.) Table 'updates' does not have column 'extra_query'. (From file 3.2.2-2013-12-22.sql.) Table 'updates' does not have column 'version' with type varchar(32). (From file 3.2.2-2014-01-18.sql.)
- Using the Fix button doesn't fix it. Instead, it results in this error:
Error Table 'updates' doesn't exist SQL=SHOW COLUMNS IN `#__updates` WHERE field = 'infourl' Table 'updates' doesn't exist SQL=SHOW COLUMNS IN `#__updates` WHERE Field = 'categoryid' Table 'updates' doesn't exist SQL=SHOW COLUMNS IN `#__updates` WHERE field = 'extra_query' Table 'updates' doesn't exist SQL=SHOW COLUMNS IN `#__updates` WHERE field = 'version' AND type = 'varchar(32)'
At this point, we're stuck and we'll need a database solution.
- Use your host's control panel to access phpMyAdmin:
- Click on Databases and access your database:
- Go to the SQL tab and add the following query to it:
DROP table IF EXISTS jos_updates; CREATE TABLE `jos_updates` ( `update_id` int(11) NOT NULL AUTO_INCREMENT, `update_site_id` int(11) DEFAULT '0', `extension_id` int(11) DEFAULT '0', `name` varchar(100) DEFAULT '', `description` text NOT NULL, `element` varchar(100) DEFAULT '', `type` varchar(20) DEFAULT '', `folder` varchar(20) DEFAULT '', `client_id` tinyint(3) DEFAULT '0', `version` varchar(32) DEFAULT '', `data` text NOT NULL, `detailsurl` text NOT NULL, `infourl` text NOT NULL, `extra_query` VARCHAR(1000) DEFAULT '', PRIMARY KEY (`update_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Available Updates';
- In the above query, replace "jos" with your table prefix (excluding the underscore).
- If you're not sure what your database table prefix is, you can find it in your Global Configuration's Server tab.
- After clicking Go, you should see a success message similar to the following:
You're done! Now double check for the problem again and it should be gone. Congrats!