?
avatar kanich
kanich
19 Jan 2017

Steps to reproduce the issue

  1. Set in administrator Global Configuration / Error reporting = 'Development'
  2. In Joomla 3.7.0.a2 administrator (when Error Reporting is set to 'Development') following errors are 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
3. Entire backend is blocked (it is not possible to continue)

Expected result

No error messages have to be shown

Actual result

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.

System information (as much as possible)

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')

Additional comments

Votes

# of Users Experiencing Issue
1/1
Average Importance Score
5.00

avatar kanich kanich - open - 19 Jan 2017
avatar zero-24
zero-24 - comment - 19 Jan 2017

@kanich can you send a pull request with the needed change against the staging branch?

avatar bertmert
bertmert - comment - 19 Jan 2017

I can not confirm this issue with a nearly untouched Staging installation of yesterday.

avatar kanich
kanich - comment - 19 Jan 2017

@bertmert My observation was made on new upgrade Joomla 3.7.0-alpha2 installed over old Joomla 3.7.0-alpha1.
OS : Linux Ubuntu 14 (64 bit)
PHP : 7.0.14

avatar bertmert
bertmert - comment - 19 Jan 2017

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...

avatar kanich
kanich - comment - 19 Jan 2017

I used fresh installation 3.7.0-alpha1 (with appropriate database sql) and then upgrade to 3.7.0-alpha2 with database fix for this version. Please find enclosed browser snapshot with error messages (on the page is then nothing more, no menu, links, buttons!)
Uploading issue_13651_browser_snapshot.png…

avatar kanich kanich - change - 19 Jan 2017
Status New Closed
Closed_Date 0000-00-00 00:00:00 2017-01-19 20:06:10
Closed_By kanich
avatar kanich kanich - close - 19 Jan 2017
avatar kanich kanich - change - 19 Jan 2017
Status Closed New
Closed_Date 2017-01-19 20:06:10
Closed_By kanich
avatar kanich kanich - reopen - 19 Jan 2017
avatar kanich
kanich - comment - 19 Jan 2017

issue_13651_browser_snapshot

avatar infograf768
infograf768 - comment - 20 Jan 2017

The update sql was not run properly from alpha to alpha. See #13660

Closing


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

avatar infograf768 infograf768 - change - 20 Jan 2017
Status New Closed
Closed_Date 0000-00-00 00:00:00 2017-01-20 15:49:05
Closed_By infograf768
avatar joomla-cms-bot joomla-cms-bot - close - 20 Jan 2017
avatar joomla-cms-bot
joomla-cms-bot - comment - 20 Jan 2017
avatar RevoLion
RevoLion - comment - 3 Feb 2017

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


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

avatar kanich
kanich - comment - 4 Feb 2017

@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.


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

avatar RevoLion
RevoLion - comment - 4 Feb 2017

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)');


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

avatar RevoLion
RevoLion - comment - 4 Feb 2017

Previous code correction was made in administrator/modules/mod_menu/helper.php


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

Add a Comment

Login with GitHub to post a comment