?
avatar bertmert
bertmert
8 Dec 2015

I' ve installed staging of today.

After installation I didn't open any list views (components).
Just configuration.
Installed patch tester, and a small backend module.
Afterwards I opened modules manager.
Selected "Administrator" in Client filter field:
Page reload and Administrator modules are displayed.
Clicked "New".
The page for selecting modules shows frontend modules.
Clicked Cancel. Filter still shows "Administrator".

Tried a lot (changing filters, client, ordering) but always frontend modules after New.
Firefox and Chrome.

avatar bertmert bertmert - open - 8 Dec 2015
avatar Bakual
Bakual - comment - 8 Dec 2015

Confirmed. And it's likely related to the Search Tools implementation

avatar Bakual Bakual - change - 8 Dec 2015
Status New Confirmed
avatar Bakual Bakual - change - 8 Dec 2015
Category Administration Modules
avatar bertmert
bertmert - comment - 8 Dec 2015

Just found out that when I change

$clientId = $app->getUserState('com_modules.modules.filter.client_id', 0);

to

$clientId = $app->getUserState('com_modules.modules.filter.client_id', 1);

in models/select.php::populateState(...)

I only see backend modules.

avatar Bakual
Bakual - comment - 8 Dec 2015

I think it's related to the change in #6958.
There, the userstate name of the client_id changed from $this->context . '.filter.client_id' to $this->context . '.client_id'

Changing the line you mentioned to $clientId = $app->getUserState('com_modules.modules.client_id', 1); seems to fix it.

avatar sovainfo
sovainfo - comment - 8 Dec 2015

From code reviiew perspective don't consider that the riight fix.

As @Bakual mentioned there is a change in name of variable. So, instead of changing the default value when variable not found, make sure you look for the correct varable!

That would make sure the setting is respected (as intended) instead of ignoring it and only show an arbitrary choice (frontend or backend, depending on 0 or 1). Obviously, when the filter is not set showing frontend is fine with me. Don't see a reason to change that!

So, proper fix would be the removal of .filter
Or even better keep the .filter and change the code that is missing the .filter. That would be much more consistent with the rest of the filters

avatar bertmert
bertmert - comment - 9 Dec 2015

[Comment removed. Too complicated for me.]

avatar bertmert
bertmert - comment - 9 Dec 2015

See PR #8626.
The simple way (that I understand).

avatar brianteeman brianteeman - close - 9 Dec 2015
avatar bertmert bertmert - change - 9 Dec 2015
Status Confirmed Closed
Closed_Date 0000-00-00 00:00:00 2015-12-09 10:20:08
Closed_By bertmert
avatar bertmert bertmert - close - 9 Dec 2015
avatar brianteeman brianteeman - change - 14 Dec 2015
Labels Added: ?

Add a Comment

Login with GitHub to post a comment