Joomla-cms: Unknown column 'client_id' in 'where clause

Created on 27 Apr 2017  Â·  31Comments  Â·  Source: joomla/joomla-cms

Steps to reproduce the issue

after update from 3.6.5 to 3.7.0, the modules menu shows the following error:
Unknown column 'client_id' in 'where clause

Expected result

no error

debug log

Unknown column 'client_id' in 'where clause'
Call stack

Function Location

1 JError::raise() JROOT\libraries\legacy\error\error.php:299
2 JError::raiseWarning() JROOT\administrator\components\com_menus\helpers\menus.php:269
3 MenusHelper::getMenuLinks() JROOT\libraries\cms\form\field\menuitem.php:174
4 JFormFieldMenuitem->getGroups() JROOT\libraries\joomla\form\fields\groupedlist.php:162
5 JFormFieldGroupedList->getInput() JROOT\libraries\joomla\form\field.php:414
6 JFormField->__get() JROOT\libraries\cms\form\field\menuitem.php:93
7 JFormFieldMenuitem->__get() JROOT\layouts\joomla\searchtools\default\filters.php:27
8 include() JROOT\libraries\cms\layout\file.php:121
9 JLayoutFile->render() JROOT\libraries\cms\layout\file.php:661
10 JLayoutFile->sublayout() JROOT\layouts\joomla\searchtools\default.php:99
11 include() JROOT\libraries\cms\layout\file.php:121
12 JLayoutFile->render() JROOT\libraries\cms\layout\helper.php:72
13 JLayoutHelper::render() JROOT\administrator\components\com_modules\views\modules\tmpl\default.php:37
14 include() JROOT\libraries\legacy\view\legacy.php:694
15 JViewLegacy->loadTemplate() JROOT\libraries\legacy\view\legacy.php:229
16 JViewLegacy->display() JROOT\administrator\components\com_modules\views\modules\view.html.php:73
17 ModulesViewModules->display() JROOT\libraries\legacy\controller\legacy.php:671
18 JControllerLegacy->display() JROOT\administrator\components\com_modules\controller.php:79
19 ModulesController->display() JROOT\libraries\legacy\controller\legacy.php:709
20 JControllerLegacy->execute() JROOT\administrator\components\com_modules\modules.php:23
21 require_once() JROOT\libraries\cms\component\helper.php:394
22 JComponentHelper::executeComponent() JROOT\libraries\cms\component\helper.php:369
23 JComponentHelper::renderComponent() JROOT\libraries\cms\application\administrator.php:98
24 JApplicationAdministrator->dispatch() JROOT\libraries\cms\application\administrator.php:156
25 JApplicationAdministrator->doExecute() JROOT\libraries\cms\application\cms.php:265
26 JApplicationCms->execute() JROOT\administrator\index.php:51

Actual result

System information (as much as possible)

Additional comments

No Code Attached Yet

Most helpful comment

The solution is to use phpMyadmin and run these queries

ALTER TABLE `#__menu_types` ADD COLUMN `client_id` int(11) NOT NULL DEFAULT 0;

UPDATE `#__menu` SET `published` = 1 WHERE `menutype` = 'main' OR `menutype` = 'menu';

Replace #_ by your db prefix

All 31 comments

You should try to go to Extensions/Manage/Database and click on "Fix" button.

Pascal

I have the same problem. After updating to Joomla 3.7.0 I get the error: Unknown column 'client_id' in 'where clause'

Clicking the FIX button on Extension/Manage/Database does not fix the problem. Please help if you can. My menu does not appear.

@aneelaranha What type of database do you use?

@th3r1dd1ck https://github.com/joomla/joomla-cms/issues/15629#issuecomment-297767710 fixed issue for you?

@wojsmol looks like comment-link isn't working.

MySQL

If you visit www.hsiweb.org you'll see my menu bar has gone. Thanks for the help.

@franz-wohlkoenig fixed
@aneelaranha Show only structure of #__menu_types table.
Related https://github.com/joomla/joomla-cms/issues/15671

The solution is to use phpMyadmin and run these queries

ALTER TABLE `#__menu_types` ADD COLUMN `client_id` int(11) NOT NULL DEFAULT 0;

UPDATE `#__menu` SET `published` = 1 WHERE `menutype` = 'main' OR `menutype` = 'menu';

Replace #_ by your db prefix

@infograf768
sql UPDATE `#__menu` SET `published` = 1 WHERE `menutype` = 'main' OR `menutype` = 'menu';
Is couse of the problem not a solution.
See https://github.com/joomla/joomla-cms/issues/15671

Original issue here is for client_id, therefore the first query may solve the issue

We have 2 issue in one, 2 by @aneelaranha

@aneelaranha can you please open an own Issue so we not have longer 2 different in one Issue, thanks.

In our forum (RocketTheme) some members had run into the same issue.
Besides having to click the 'Fix' button for the database in the Joomla admin, they also had a lot of entries showing under > Extensions > Discover. After selecting all of them and installing, the error was fixed. Seems like the Joomla update has just failed in those cases.

@franz-wohlkoenig my apologies. I thought the issue was the same so didn't open a different post.
@kat05 thank you so much! I did what you suggested and THEN ran a FIX database and it worked.

This is my first time ever posting in a forum and I am grateful to all of you for your suggestions. Blessings.

Just Upgraded to Joomla 3.7
After adding a new menu item, then attempting to view it, I received the following error:
Unknown column 'a.client_id' in 'field list' Unknown column 'a.client_id' in 'where clause'

When viewing modules I receive this error:
Unknown column 'client_id' in 'where clause'

Q - How can I fix this?

Set to "closed" on behalf of @franz-wohlkoenig by The JTracker Application at issues.joomla.org/joomla-cms/15629

closed as having PR #15690


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/15629.

||||||||||||||||||||||||||||||||||||||||||||||||||||||||||

After reading so many forums and websites only this one got it fixed for me -

https://ltheme.com/question/error-1054-unknown-column-a-client_id-in-where-clause-in-backend-after-joomla-3-8-update/

This is not problem with page builder, you just go to admin > extension > database, click to button ‘Fix’ and recheck.

Yes, but BACKEND did´nt work anymore.
got some other Forum and tried this Solution.
COPY PATH BELOW AND PASTE ON YOUR WEBSITE
Just make a database Repair: YOURWEBSITE.COM/administrator/index.php?option=com_installer&task=database.fix
Now, Backend works and shows properly with Joomla 3.8.1

||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||

Thax shajhan, my problem resolved, it's fixed

THANK YOU shajhan!!!! you saved my life!!!!!!!!!!!!!

THANK YOU shajhan!! a very quick fix!

THANK YOU.I met this problem, too.

This work out good if the back end was also Broken down https://github.com/joomla/joomla-cms/issues/15629#issuecomment-298150167

The solution is to use phpMyadmin and run these queries

ALTER TABLE `#__menu_types` ADD COLUMN `client_id` int(11) NOT NULL DEFAULT 0;

UPDATE `#__menu` SET `published` = 1 WHERE `menutype` = 'main' OR `menutype` = 'menu';

Replace #_ by your db prefix

You saved me! Thank you so much

The solution is to use phpMyadmin and run these queries

ALTER TABLE `#__menu_types` ADD COLUMN `client_id` int(11) NOT NULL DEFAULT 0;

UPDATE `#__menu` SET `published` = 1 WHERE `menutype` = 'main' OR `menutype` = 'menu';

Replace #_ by your db prefix

Had to do this after upgrade to Joomla 3.91 which broke website and admin website, many thanks kudos to you.

image
I don't have any menu options when I try to log in...Unfortunately, I am a pretty novice Joomla user; I inherited this client site from a previous coworker and everything seemed to go smoothly until now. Any other advice to get the site working again?

@AFCURESite Please ask on Forum as this is for Coding.

The solution is to use phpMyadmin and run these queries

ALTER TABLE `#__menu_types` ADD COLUMN `client_id` int(11) NOT NULL DEFAULT 0;

UPDATE `#__menu` SET `published` = 1 WHERE `menutype` = 'main' OR `menutype` = 'menu';

Replace #_ by your db prefix

This solved the issue. Thanks

image
I don't have any menu options when I try to log in...Unfortunately, I am a pretty novice Joomla user; I inherited this client site from a previous coworker and everything seemed to go smoothly until now. Any other advice to get the site working again?

you can execute it on terminal (SSH) mysql -u root -p
or via phpmyadmin

remember to change #__ to your prefix

Was this page helpful?
0 / 5 - 0 ratings