1

So, I recently had an issue with a failure with updating to Joomla 3.6.5. It looks like I was mostly able to recover from the error by manually updating, however there seem to be issues with the database. Fixing the database just produces more errors, and thus isn't a option.

Error

Table 'greentec.#__updates' doesn't exist SQL=SHOW COLUMNS IN `#__updates` WHERE field = 'infourl'
Table 'greentec.#__updates' doesn't exist SQL=SHOW COLUMNS IN `#__updates` WHERE Field = 'categoryid'
Table 'greentec.#__updates' doesn't exist SQL=SHOW COLUMNS IN `#__updates` WHERE field = 'extra_query'
Table 'greentec.#__updates' doesn't exist SQL=SHOW COLUMNS IN `#__updates` WHERE field = 'version' AND type = 'varchar(32)'

and the following list of database problems:

Database schema version (3.4.0-2015-02-26) does not match CMS version (3.6.3-2016-08-16).
Database update version (3.4.8) does not match CMS version (3.6.5).
Table 'zyjgk_updates' does not have column 'infourl'. (From file 2.5.0-2012-01-10.sql.)
Table 'zyjgk_updates' should not have column 'categoryid'. (From file 3.0.0.sql.)
Table 'zyjgk_updates' does not have column 'extra_query'. (From file 3.2.2-2013-12-22.sql.)
Table 'zyjgk_updates' does not have column 'version' with type varchar(32). (From file 3.2.2-2014-01-18.sql.)
Table 'zyjgk_session' does not have column 'session_id' with type varchar(191). (From file 3.5.0-2015-07-01.sql.)
Table 'zyjgk_user_keys' does not have column 'series' with type varchar(191). (From file 3.5.0-2015-07-01.sql.)
Table 'zyjgk_contentitem_tag_map' should not have index 'idx_tag'. (From file 3.5.0-2015-10-26.sql.)
Table 'zyjgk_contentitem_tag_map' should not have index 'idx_type'. (From file 3.5.0-2015-10-26.sql.)
Table 'zyjgk_redirect_links' should not have index 'idx_link_old'. (From file 3.5.0-2016-03-01.sql.)
Table 'zyjgk_redirect_links' does not have column 'old_url' with type VARCHAR(2048). (From file 3.5.0-2016-03-01.sql.)
Table 'zyjgk_redirect_links' does not have column 'new_url' with type VARCHAR(2048);. (From file 3.5.0-2016-03-01.sql.)
Table 'zyjgk_redirect_links' does not have column 'referer' with type VARCHAR(2048). (From file 3.5.0-2016-03-01.sql.)
Table 'zyjgk_redirect_links' does not have index 'idx_old_url'. (From file 3.5.0-2016-03-01.sql.)
Table 'zyjgk_user_keys' does not have column 'user_id' with type varchar(150). (From file 3.5.1-2016-03-25.sql.)
Table 'zyjgk_redirect_links' does not have column 'new_url' with type VARCHAR(2048);. (From file 3.6.0-2016-04-06.sql.)
Table 'zyjgk_menu_types' does not have column 'asset_id'. (From file 3.6.0-2016-04-09.sql.)
Table 'zyjgk_languages' does not have column 'asset_id'. (From file 3.6.0-2016-06-05.sql.)
Table 'zyjgk_newsfeeds' does not have column 'link' with type VARCHAR(2048). (From file 3.6.3-2016-08-15.sql.)
The Joomla! Core database tables have not been converted yet to UTF-8 Multibyte (utf8mb4).

The site seem to be functioning for now, but I get database errors when I try to run an update, so I'm sure of how to proceed.

  • How did you "manually" update Joomla? - Didn't you upload the zip-file in the administrator's backend? When you only uploaded changed files, the database tables would not be altered to the latest version. You have to use the installation procedure on the backend. – Tom Kuschel Dec 15 '16 at 15:22
  • I transferred the files via ftp to the host server. The one-click update failed mid update, so I can only assume that that influenced the result. Joomla's info says it's the new version. – nizz0k Dec 15 '16 at 15:27
  • One more question: From which version to 3.6.5 did you try updating? And did you use the patch package or full package? – Tom Kuschel Dec 15 '16 at 15:40
  • Just the patch. 3.64=>3.6.5 – nizz0k Dec 15 '16 at 15:41
-1

Did you update the machine locally or on a remote server? - It is always a good idea to backup your live machine to a local one, and check the update first. I would roll back a backup, or if that does not help:

  1. Make a backup, copy all files and backup database to a local machine;

  2. With phpmyadmin or similar program, I would analyze the database with the tables above, e.g. if the zyjgk_updates' does not have column 'infourl' ; and compare the data structure of each table with a new joomla installation. If there are any differences, try to alter the table manually within phpmyadmin.

For me, it looks like, there is a broken table zyjgk_update ... And with more information, the community can deliver also much more help.

  • Hi Tom, after looking at the problems in detail, I think this is the way to go for recovery. I will have to look at the tables in more detail and see how it goes. – nizz0k Dec 19 '16 at 7:54
2

If you initially installed Joomla through Cpanel, by default, a backup is automatically created prior to update. I would look into that. I wont beat a dead horse but BACK UP, BACK UP, BACK UP! :)

Now, what may indeed be the problem is a simply fix that should have been done before and/or checked after update..

How to (most likely) fix the error. (also check to see what php and mysql versions you are running)

Before updating and/or after your instance of Joomla you need to fix the database tables for the site. The database tool can be found under the extensions manager > database tab in your site's admin.

  • Once on this screen you should see that there are errors in the database.

  • If there are errors click the fix button in the top right hand corner.

  • After the fix button has been clicked you should see a success message as per the screenshot below.

Note: pay no mind to the pics and joomla version. It is the same concept.

enter image description here enter image description here enter image description here enter image description here

And Lastly - Perform a back up now if all went well.

  • Hi Johnny, thanks for your detailed and well illustrated post. You're right, backing up is critical and I messed up here, big time. However, your post largely illustrates something that I mentioned wasn't an option (fixing the db via the control panel). I will be looking into the existence of the automatic back ups, and I hope you're right. It's not Cpanel, and I have minimal control over the server beyond phpmyadmin access and selecting some software versions. – nizz0k Dec 19 '16 at 7:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.