?
avatar paternax
paternax
6 Aug 2020

Steps to reproduce the issue

Home Dashboard -> Site - Modules

  1. Select "Administrator" then select a module position in filter options (for example cpanel)

  2. Go back to Home Dashboard

  3. Again to Site - Modules
    There you have now an empty list without modules although nothing is selected in the "site" filter options.
    It seems as if the cpanel from the last aelection hasn't been cleared

Expected result

screen shot 2020-08-06 at 13 21 21

Actual result

screen shot 2020-08-06 at 13 19 15

System information (as much as possible)

Joomla 4.0.0beta4-de
PHP 7.3

Additional comments

avatar paternax paternax - open - 6 Aug 2020
avatar joomla-cms-bot joomla-cms-bot - labeled - 6 Aug 2020
avatar astridx
astridx - comment - 7 Aug 2020

I cannot confirm this with the current developer version.

Off topic: I find it confusing that the drop down to change admin / site is still there. If I choose on the left in the menu site, then I expect to switch to admin here.

Modules Administrator test Administration

avatar richard67
richard67 - comment - 7 Aug 2020

I can confirm the issue with a current 4.0-dev branch.

avatar richard67
richard67 - comment - 7 Aug 2020

I did exactly as described, after filtering the admin modules going back to the Home Dashboard and then on the "Site" panel clicked the big "Modules" button. I.e. I did not use the menu items on the left hand side. After that, the site filter was "Site" for the frontend but no menus were shown. Clear filter button was not enabled. Filtering by a module position which exists on the site (frontend) and then clearing the filter brings back all site modules in the list.

avatar richard67 richard67 - change - 7 Aug 2020
Status New Confirmed
avatar richard67
richard67 - comment - 7 Aug 2020

Confirmed.


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

avatar astridx
astridx - comment - 8 Aug 2020

@richard67
Now you made me feel insecure and I tried again. Maybe I'm still getting something wrong? I really didn't click left in the menu. The site modules still appear for me. Maybe it's also due to the system settings. I don't have any current versions on my test computer:

php: Linux TravelMate-5760G 4.15.0-112-generic #113-Ubuntu SMP Thu Jul 9 23:41:39 UTC 2020 x86_64
dbserver: mysql
dbversion: 5.7.31-0ubuntu0.18.04.1
dbcollation: utf8mb4_unicode_ci
dbconnectioncollation: utf8mb4_general_ci
dbconnectionencryption:
dbconnencryptsupported: true
phpversion: 7.2.32-1+ubuntu18.04.1+deb.sury.org+1
server: Apache/2.4.29 (Ubuntu)
sapi_name: apache2handler
version: Joomla! 4.0.0-beta4-dev Development [ Mañana ] 29-July-2020 18:21 GMT
useragent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:79.0) Gecko/20100101 Firefox/79.0

avatar richard67
richard67 - comment - 8 Aug 2020

@astridx Thanks for testing again. And of course I believe you. We are using same server OS (Ubuntu), so it must be something else.

avatar richard67
richard67 - comment - 8 Aug 2020

@astridx What’s your session handler? Database (which is default on a new installation), or PHP?

avatar astridx
astridx - comment - 8 Aug 2020

I'm so sorry. I misunderstood that. I have now done the following:

  1. Content | Administrator Modules
  2. Filter set on Cpanel
  3. Site selected in the drop down on the top and in the left admin menu

Now I actually didn't see a module even though the filter was deleted.

The filter was deleted because this function is called when the selection is changed:

Joomla.resetFilters = (element) => {

But form.submit(); in line 41 is undefined.

avatar Quy
Quy - comment - 9 Aug 2020

Please test PR #30323

avatar Quy Quy - close - 9 Aug 2020
avatar Quy Quy - change - 9 Aug 2020
Status Confirmed Closed
Closed_Date 0000-00-00 00:00:00 2020-08-09 13:40:11
Closed_By Quy
avatar richard67
richard67 - comment - 10 Aug 2020

Reopening as requested in #30323 (comment) .

avatar richard67 richard67 - change - 10 Aug 2020
Status Closed New
Closed_Date 2020-08-09 13:40:11
Closed_By Quy
avatar richard67 richard67 - reopen - 10 Aug 2020
avatar astridx
astridx - comment - 11 Aug 2020

I think now i found the reason for the problem. Before I rush to do something, I would like to check this out with you.

Because oft the change here https://github.com/joomla/joomla-cms/pull/24801/files#diff-245b1879403befd92899430e9ad5d673 the URL changed, if we switch from site to admin (the url has changed in several places).

That is why the input-object does not have an entry in the data array for the filters. (So we could have saved ourselves the reset via Joomla.resetFilters.)
Screenshot from 2020 08 11 10 26 56(1)

So $filters is empty here

if (isset($filters[$name]))

That is why the list model used a fall back (BC for Search Tools which uses different naming) to old state of the filters.

It is not immediately noticeable in other components. But here it is like this: if we select the position cpanel for admin and then switch to the site the list view is empty, because we do not have the position cpanel for the site.

We have this problem not only when we change the URL. It also when we click on a menu item in the left side panel. That is why the form is not submitted in this case, too.

How do we best solve this problem?

avatar chmst
chmst - comment - 12 Aug 2020

I think it is ok that the view is empty, as filtering for cpanel gives an empty list.
The error is that position cpanel is not visible in the filter bar. Searchtools mus be closed if no filter is active or at least one filter field must have a selected option.

avatar astridx
astridx - comment - 12 Aug 2020

I think it is ok that the view is empty, as filtering for cpanel gives an empty list.
The error is that position cpanel is not visible in the filter bar. Searchtools mus be closed if no filter is active or at least one filter field must have a selected option.

@chmst Thank you for your feedback.
It would also be wrong if, after switching from admin to site, cpanel would stay in the position field, although this position does not exist in the site, right?
In the case of option=com_templates&view=styles the number of filter fields even changes. For site there is menu_item and template. For admin there is only a template to choose from. Therefore I think that the filter fields have to be reseted when changing client_id.

I would prefer to use a static action url in the form, but to include the client ID as a hidden field.
But this solution is only good for the select field that changed the client_id, not if you change view via the admin menu on the left side. Therefore I would integrate only one entry for the modules in the menu on the left. This would open the site by default and with the drop down you can then switch to admin.

avatar chmst
chmst - comment - 12 Aug 2020

It would also be wrong if, after switching from admin to site, cpanel would stay in the position field, although this position does not exist in the site, right?

At least it would explain what was the filter and why the result is empty.

To have only one link to (site) modules as in 3.9 - sound like a good idea.

avatar richard67
richard67 - comment - 4 Sep 2020

@wilsonge Do you think this could be a release blocker? From my point of view itr could be. We end up in an empty list view without any visibly active filter and so getting wrong information.

avatar Quy Quy - change - 5 Sep 2020
Status New Closed
Closed_Date 0000-00-00 00:00:00 2020-09-05 14:32:17
Closed_By Quy
avatar Quy
Quy - comment - 5 Sep 2020

Please test PR #30577

avatar Quy Quy - close - 5 Sep 2020
avatar richard67 richard67 - change - 21 Sep 2020
Status Closed New
Closed_Date 2020-09-05 14:32:17
Closed_By Quy
avatar richard67
richard67 - comment - 21 Sep 2020

Re-opening this issue since PR #30577 has been closed meanwhile.

avatar richard67 richard67 - reopen - 21 Sep 2020
avatar Quy Quy - close - 11 May 2021
avatar Quy
Quy - comment - 11 May 2021

Please test PR #33763. Thanks.

avatar Quy Quy - change - 11 May 2021
Status New Closed
Closed_Date 0000-00-00 00:00:00 2021-05-11 04:36:53
Closed_By Quy

Add a Comment

Login with GitHub to post a comment