Skip to content

Instantly share code, notes, and snippets.

@Yiannistaos
Created November 24, 2023 15:40
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Yiannistaos/8e955d8f772b91508896cc8ca7d31e1c to your computer and use it in GitHub Desktop.
Save Yiannistaos/8e955d8f772b91508896cc8ca7d31e1c to your computer and use it in GitHub Desktop.
Fix Unknown column 'a.ordering' error after upgrade from Joomla! 4.4 to Joomla! 5

Fix Unknown column 'a.ordering' error after upgrade from Joomla! 4.4 to Joomla! 5

Unknown column 'a.ordering' in 'order clause'

Unknown column 'a.ordering' in 'order clause'
$results = $db->setQuery($query)->loadObjectList();

Solution:

Open PhpMyAdmin > SQL and type this:

ALTER TABLE `#__menu_types` ADD COLUMN `ordering` int NOT NULL DEFAULT 0 AFTER `client_id` /** CAN FAIL **/;
UPDATE `#__menu_types` SET `ordering` = `id` WHERE `client_id` = 0;
@sirius82
Copy link

You saved me ! You have my eternal gratitude!
Do you know why this column is missing ??

Thanks a lot !!!!

@Yiannistaos
Copy link
Author

You're welcome, @sirius82 😊
I have no idea why it was missing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment