? ? Pending

User tests: Successful: Unsuccessful:

avatar wilsonge
wilsonge
12 Jan 2017

Summary of Changes

When there is an SQL issue getting the fields (maybe you update from a version before fields to after fields without triggering the sql update etc), then then JModelList::getItems will return false https://github.com/joomla/joomla-cms/blob/staging/libraries/legacy/model/list.php#L190 and you subsequently get PHP errors trying to do a foreach on false.

Warning: Invalid argument supplied for foreach() in JROOT/administrator/components/com_fields/helpers/fields.php on line 146

Do we want to display a warning in the frontend about such issues? Only show something for super admins? Obviously in the case of the table not existing then you'll get warnings shown in the backend.

Testing Instructions

Delete the #__fields table. Before the patch you get 4 php warnings on an article. After patch no warning

Documentation Changes Required

None

avatar wilsonge wilsonge - open - 12 Jan 2017
avatar wilsonge wilsonge - change - 12 Jan 2017
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 12 Jan 2017
Category Administration com_fields
avatar wilsonge wilsonge - change - 12 Jan 2017
The description was changed
avatar wilsonge wilsonge - edited - 12 Jan 2017
avatar wilsonge wilsonge - change - 12 Jan 2017
The description was changed
avatar wilsonge wilsonge - edited - 12 Jan 2017
avatar genesisfan
genesisfan - comment - 14 Jan 2017

I have tested this item successfully on 845b556


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

avatar genesisfan genesisfan - test_item - 14 Jan 2017 - Tested successfully
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 15 Jan 2017

I have tested this item successfully on 845b556

View Article on Frontend shows no more Warning after Patch.


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

avatar franz-wohlkoenig franz-wohlkoenig - test_item - 15 Jan 2017 - Tested successfully
avatar wilsonge wilsonge - change - 15 Jan 2017
Status Pending Ready to Commit
avatar wilsonge
wilsonge - comment - 15 Jan 2017

RTC. Thanks guys!


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

avatar Bakual Bakual - change - 15 Jan 2017
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2017-01-15 19:46:12
Closed_By Bakual
Labels Added: ? ?
avatar Bakual Bakual - close - 15 Jan 2017
avatar Bakual Bakual - merge - 15 Jan 2017

Add a Comment

Login with GitHub to post a comment