Notice: Undefined property: stdClass::$client_id in joomla/libraries/vendor/joomla/utilities/src/ArrayHelper.php on line 521
Notice: Undefined property: stdClass::$client_id in joomla/libraries/vendor/joomla/utilities/src/ArrayHelper.php on line 522
3. Entire backend is blocked (it is not possible to continue)
No error messages have to be shown
In Joomla 3.7.0.a2 administrator (when Error Reporting is set to 'Development') following errors is shown :
Notice: Undefined property: stdClass::$client_id in joomla/libraries/vendor/joomla/utilities/src/ArrayHelper.php on line 521
Notice: Undefined property: stdClass::$client_id in joomla/libraries/vendor/joomla/utilities/src/ArrayHelper.php on line 522
and it is not possible to continue with any administrator tasks.
Problem was located in :
administrator/modules/mod_menu/preset/enabled.php
line 164 $menuTypes = ModMenuHelper::getMenus();
line 165 $menuTypes = ArrayHelper::sortObjects($menuTypes, array('client_id', 'title'), 1, false);
where ModMenuHelper::getMenus() is not returning class field 'client_id'.
Problem can be solved with including 'client_id' in SQL query in administrator/modules/mod_menu/helper.php after line 36 :
->select('b.client_id')
I can not confirm this issue with a nearly untouched Staging installation of yesterday.
I compared database of 3.6.5 with Staging 3.7.0 of yesterday and I found a new column client_id in table #__menu_types.
Concerning updates I think this PR of yesterday is important, too. (Meged yesterday): https://github.com/joomla/joomla-cms/pull/13619/files
Maybe that's the reason? Somewhere, somehow, ....? We will see...
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2017-01-19 20:06:10 |
Closed_By | ⇒ | kanich |
Status | Closed | ⇒ | New |
Closed_Date | 2017-01-19 20:06:10 | ⇒ | |
Closed_By | kanich | ⇒ |
The update sql was not run properly from alpha to alpha. See #13660
Closing
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2017-01-20 15:49:05 |
Closed_By | ⇒ | infograf768 |
Set to "closed" on behalf of @infograf768 by The JTracker Application at issues.joomla.org/joomla-cms/13651
So how do I fix the error for Joomla! 3.7.0-alpha2. This error "1054 Unknown column 'client_id' in 'field list'" occurs only when I click on a menu in the menu manager.
JT
@RevoLion This error is caused by uninitialised variable which should contain value of new column 'client_id' (added in Joomla 3.7) to database table. It is necessary to find part of code where menu variables are initialised and there include 'client_id' variable to correct initial value.
So does this correction look right, because I can not get it to fix.
{
$db = JFactory::getDbo();
$query = $db->getQuery(true)
->select('a.*, SUM(b.home) AS home')
->from('#__menu_types AS a')
->join('LEFT', '#__menu AS b ON b.menutype = a.menutype AND b.home != 0')
->select('b.language')
->select('b.client_id')
->join('LEFT', '#__languages AS l ON l.lang_code = language')
->select('l.image')
->select('l.sef')
->select('l.title_native')
->where('(b.client_id = 0 OR b.client_id IS NULL)');
Previous code correction was made in administrator/modules/mod_menu/helper.php
@kanich can you send a pull request with the needed change against the staging branch?