?
avatar Devportobello
Devportobello
11 May 2016

Steps to reproduce the issue

Edit file: https://github.com/joomla/joomla-cms/blob/staging/administrator/components/com_content/views/articles/view.html.php#L43
Move $this->filterForm = $this->get('FilterForm');
before $this->items = $this->get('Items');

Administrator side:
Configuration > Error Reporting: System default or Maximum or Development
Then Articles listing

Will throw:
Notice: Undefined property: JObject::$list.direction in PathTo\Joomla_3_5_1\libraries\legacy\model\list.php on line 453
Notice: Undefined property: JObject::$list.limit in PathTo\Joomla_3_5_1\libraries\legacy\model\list.php on line 454
Notice: Undefined property: JObject::$list.ordering in PathTo\Joomla_3_5_1\libraries\legacy\model\list.php on line 455
Notice: Undefined property: JObject::$list.start in PathTo\Joomla_3_5_1\libraries\legacy\model\list.php on line 456

System information (as much as possible)

Joomla 3.5.1

avatar Devportobello Devportobello - open - 11 May 2016
avatar brianteeman brianteeman - change - 11 May 2016
Labels Added: ?
avatar schnuti
schnuti - comment - 12 May 2016

@Devportobello
As I understand your post, it's ok as it is and you get notices if you modify.it? Or the oppisite?

I*ve tested around a lot with error message level set to show noticces lately. Have not seen this.

avatar Devportobello
Devportobello - comment - 12 May 2016

Actually it's ok
I noticed this in 1 of my third component who call filterForm before calling -eg- getItems ...
So, calling filterForm before populating state

avatar Devportobello Devportobello - change - 12 May 2016
The description was changed
avatar schnuti
schnuti - comment - 12 May 2016

So everything ok then?
You were lucky to find the notices.
If you don't call populateState before filterForm and getItems , I'm pretty sure that both will fail to show correct data. With or without notice

Maybe you could try to find a general way to call populateState for the listviews, if it's not yet called, Otherwise you could override the methods in your own code.

I think I'm right.

avatar Devportobello
Devportobello - comment - 12 May 2016

If you don't call populateState before filterForm and getItems , I'm pretty sure that both will fail to show correct data. With or without notice

Dont agree :) but maybe i missing something

getItems will call getState to populate state
When filterForm never populate state before loading form data

avatar schnuti
schnuti - comment - 12 May 2016

Yes, you are right. Sorry.

// Get a storage key.
$store = $this->getStoreId();

Makes the trick in my code.
And filterForm doesn*t call populateState.

avatar wilsonge
wilsonge - comment - 12 May 2016

Closed as we have a PR in #10435

avatar wilsonge wilsonge - change - 12 May 2016
Status New Closed
Closed_Date 0000-00-00 00:00:00 2016-05-12 11:48:43
Closed_By wilsonge
avatar wilsonge wilsonge - close - 12 May 2016
avatar wilsonge wilsonge - close - 12 May 2016
avatar patricmutwiri
patricmutwiri - comment - 19 Jul 2016

I've tried getting rid of that error by interchanging the position of $this->filterForm = $this->get('FilterForm'); and $this->items = $this->get('Items'); and still nothing.

Add a Comment

Login with GitHub to post a comment