? ? Pending

User tests: Successful: Unsuccessful:

avatar astridx
astridx
5 Sep 2020

Pull Request for Issue #30302 .

Summary of Changes

This pull request turns the links site modules and admin modules into one link modules. So the URI stays the same when changing from site module to admin module. This has the advantage that the filters, especially reset filters, continue to work correctly.

Note If the distinction between admin and site modules is wanted, it would be better to include the client_id in a hidden form field. But I would do this in a separate PR.

Testing Instructions

  1. Apply this patch. You can use patch tester. npm or composer are not required.

  2. Open the modules and check that admin and site modules view can be changed with the drop down and that the modules entry is always active in the admin menu on the left side.

Modules Site test Administration

  1. Set filters, switch between admin and custom and check that the filters are deleted when you switch. See #30302
  2. Check, that quicktask near the content menu item works correct.

Content Dashboard test Administration

  1. Use different presets and check, that these work correct.

Modules Administrator Menu test Administration

Actual result BEFORE applying this Pull Request

Reset Filter does not work properly, see #30302.

Expected result AFTER applying this Pull Request

Reset Filter does work.

Documentation Changes Required

No

avatar astridx astridx - open - 5 Sep 2020
avatar astridx astridx - change - 5 Sep 2020
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 5 Sep 2020
Category Administration com_content com_menus com_modules Language & Strings
avatar astridx astridx - change - 5 Sep 2020
Title
Modulefilter
[4.0] Modulefilterfix
avatar astridx astridx - edited - 5 Sep 2020
avatar paternax paternax - test_item - 5 Sep 2020 - Tested successfully
avatar paternax
paternax - comment - 5 Sep 2020

I have tested this item successfully on e1a1de0


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

avatar brianteeman
brianteeman - comment - 5 Sep 2020

This PR results in the loss of the quicktask link for creating a new module. I would be sad to see this go

avatar Quy
Quy - comment - 5 Sep 2020

Quick icon needs to be updated.

30577

avatar infograf768
infograf768 - comment - 6 Sep 2020

I took off the administrator modules menu item from alternate.xml
Then, I used the Modules menu item and chose Administrator as client, then New:

Although the correct Modules list is displayed, the manager title is always Modules (Site) instead of Modules (Administrator)

avatar astridx astridx - change - 6 Sep 2020
Labels Added: ? ?
avatar joomla-cms-bot joomla-cms-bot - change - 6 Sep 2020
Category Administration com_content com_menus com_modules Language & Strings Administration com_content com_menus com_modules Language & Strings Modules
avatar astridx
astridx - comment - 6 Sep 2020

@brianteeman This PR results in the loss of the quicktask link for creating a new module. I would be sad to see this go

Yes you are right. This is a pity.
But, if there is only one link in the side menu, quicktask would be confusing, right? You then don't know whether a site or admin module is being created. Do you have a suggestion? Of course it is easier with two menu item entries (one for site and one for admin). But the way I see it, this is only possible with a GET variable. With a GET variable in the URL, however, any filters that may have been set are not deleted. Or do you see a possibility there?

avatar astridx
astridx - comment - 6 Sep 2020

@Quy Quick icon needs to be updated.

30577

Thanks, I missed that. Now I've corrected it.

avatar astridx
astridx - comment - 6 Sep 2020

@SharkyKZ On glip your wrote, that there is no need to remove site/client module URLs, because this can be fixed in the model alone.

Thanks for checking. I have tried this #30323 and explained here why I think this is in my opinion not possible. What am I missing? Can you give me a hint how I can implement it?

avatar astridx
astridx - comment - 6 Sep 2020

@infograf768 I took off the administrator modules menu item from alternate.xml
Then, I used the Modules menu item and chose Administrator as client, then New:

Although the correct Modules list is displayed, the manager title is always Modules (Site) instead of Modules (Administrator)

Thanks, I missed alternate.xml. Now I've corrected it.

Can you explain to me in more detail which title is incorrect? It looks right for me. See pictures. But maybe I get you wrong.

Modules Site test Administration(1)
Modules Administrator test Administration

avatar Quy
Quy - comment - 6 Sep 2020

But, if there is only one link in the side menu, quicktask would be confusing, right?

Make it same as the Modules quick icon.

avatar infograf768
infograf768 - comment - 7 Sep 2020

@astridx

Can you explain to me in more detail which title is incorrect? It looks right for me. See pictures. But maybe I get you wrong.

modules_filter

avatar SharkyKZ
SharkyKZ - comment - 7 Sep 2020

@astridx I don't have an exact solution yet. Using client ID from request when building context key or clearing filters when client ID has changed could work. In any case, we have more instances like this (e.g. template styles).

avatar infograf768
infograf768 - comment - 7 Sep 2020

clearing filters when client ID has changed could work

That would be ideal so we can keep quicktasks.

avatar paternax paternax - test_item - 7 Sep 2020 - Tested successfully
avatar paternax
paternax - comment - 7 Sep 2020

I have tested this item successfully on abb778f


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

avatar ceford
ceford - comment - 7 Sep 2020

I am not sure about this. When I change from Site to Administrator I see the filter being cleared before page load. That is probably as annoying as not clearing the filters. Otherwise, it seems to work.


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

avatar astridx
astridx - comment - 7 Sep 2020

But, if there is only one link in the side menu, quicktask would be confusing, right?

@Quy Make it same as the Modules quick icon.

I inserted quicktast again in all presets. like you suggested.

avatar astridx
astridx - comment - 7 Sep 2020

@ceford I am not sure about this. When I change from Site to Administrator I see the filter being cleared before page load. That is probably as annoying as not clearing the filters. Otherwise, it seems to work.
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/30577.

If I understand you correctly, then it has to be like this, otherwise wrong data would be loaded (or they have to be loaded twice). The elements in the list are loaded using the filters. Did I understand you correctly?

avatar astridx
astridx - comment - 7 Sep 2020

@infograf768

Although the correct Modules list is displayed, the manager title is always Modules (Site) instead of Modules (Administrator)

Thank you. I corrected the title.

avatar astridx
astridx - comment - 7 Sep 2020

@SharkyKZ astridx I don't have an exact solution yet. Using client ID from request when building context key or clearing filters when client ID has changed could work. In any case, we have more instances like this (e.g. template styles).

But isn't it also wrong with template styles? See
#30302 (comment)

avatar Quy
Quy - comment - 7 Sep 2020

In the quick icon, the tooltip for the + icon is "Add Site Module" which is not correct depending on the current module type selected.

avatar astridx
astridx - comment - 7 Sep 2020

@Quy uy In the quick icon, the tooltip for the + icon is "Add Site Module" which is not correct depending on the current module type selected.

Thanks done.

avatar SharkyKZ
SharkyKZ - comment - 7 Sep 2020

But isn't it also wrong with template styles? See
#30302 (comment)

Yes, it's wrong. But this should be fixed instead of being stripped out.

avatar Formatio-hippocampi Formatio-hippocampi - test_item - 11 Sep 2020 - Tested unsuccessfully
avatar Formatio-hippocampi
Formatio-hippocampi - comment - 11 Sep 2020
  1. Use different presets and check, that these work correct.

I have tested this item ? unsuccessfully on 00f8d52

  1. Go to Menu Dashboard
  2. Click on Add module to the dashboard
  3. Select a Module Type
  4. At Top of Modal-Windows Part of Admin-Template and at Bottom Buttons Close, Save & Close are shown. Click on Save & Close at Bottom didn't work:

Screenshot_2020-09-11 Menu Dashboard - fw4 - Administration

System Information

php: Linux lamp131.cloudaccess.net 3.10.0-714.10.2.lve1.5.17.el6h.x86_64 #1 SMP Mon Apr 30 13:48:47 EDT 2018 x86_64
dbserver: mysql
dbversion: 5.7.24-cll-lve
dbcollation: utf8_general_ci
dbconnectioncollation: utf8mb4_general_ci
dbconnectionencryption:
dbconnencryptsupported: false
phpversion: 7.3.21
server: Apache
sapi_name: cgi-fcgi
version: Nightly Build - Joomla! 4.0.0-beta4-dev Development [ Mañana ] 29-July-2020 18:21 GMT
useragent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:80.0) Gecko/20100101 Firefox/80.0


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

avatar paternax
paternax - comment - 11 Sep 2020

I have tested this item ? unsuccessfully on 00f8d52

1. Go to `Menu Dashboard`

2. Click on `Add module to the dashboard`

3. Select a Module Type

4. At Top of Modal-Windows Part of Admin-Template and at Bottom Buttons `Close`, `Save & Close` are shown. Click on `Save & Close` at Bottom didn't work:

I can't confirm this problem. The Save&Close worked in the scenario Formation h. described.

avatar paternax paternax - test_item - 11 Sep 2020 - Tested successfully
avatar paternax
paternax - comment - 11 Sep 2020

I have tested this item successfully on 00f8d52


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

avatar infograf768
infograf768 - comment - 11 Sep 2020

I confirm @Formatio-hippocampi findings
This PR breaks inserting a module when using the bottom buttons.
It works when using the toolbar top buttons but does not display at once. Page has to be reloaded to see the new module.

Displaying the status and the toolbar in the modal window is wrong.

Screen Shot 2020-09-11 at 10 05 02

I have tested this item ? unsuccessfully on 00f8d52

avatar infograf768
infograf768 - comment - 11 Sep 2020

It looks like the issue comes from
/administrator/components/com_modules/tmpl/select/default.php line 61

I solved it by using
<?php $link = 'index.php?option=com_modules&task=module.add&eid=' . $item->extension_id . $this->modalLink; ?>

instead of
<?php $link = 'index.php?option=com_modules&task=module.add&eid=' . $item->extension_id; ?>

avatar astridx
astridx - comment - 11 Sep 2020

Thank you @Formatio-hippocampi and @infograf768 . I did not see that. I have corrected it.
A module can now also be correctly added via "add module to the dashboard".

Control Panel test Administration

avatar Formatio-hippocampi Formatio-hippocampi - test_item - 12 Sep 2020 - Tested successfully
avatar Formatio-hippocampi
Formatio-hippocampi - comment - 12 Sep 2020

I have tested this item successfully on 17da55f


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

avatar infograf768
infograf768 - comment - 12 Sep 2020

Works OK now but I still think that clearing filters when client ID has changed would be a better solution.

avatar pabloarias pabloarias - test_item - 17 Sep 2020 - Tested successfully
avatar pabloarias
pabloarias - comment - 17 Sep 2020

I have tested this item successfully on 17da55f

Hello:

I've followed Testing Instructions, first without applying the path and then applying it. Now, when I back to modules list, I see modules.

Tested with Joomla Beta 5-dev and PHP 7.3.22.

Thank you!


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

avatar brianteeman brianteeman - test_item - 19 Sep 2020 - Tested unsuccessfully
avatar brianteeman
brianteeman - comment - 19 Sep 2020

I have tested this item ? unsuccessfully on 17da55f


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

avatar brianteeman
brianteeman - comment - 19 Sep 2020

Before

before

After

after

avatar astridx
astridx - comment - 19 Sep 2020

@brianteeman
Thank you for testing. Can you explain in short words what you mean?

avatar astridx astridx - close - 19 Sep 2020
avatar astridx astridx - change - 19 Sep 2020
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2020-09-19 19:02:27
Closed_By astridx
avatar astridx astridx - change - 19 Sep 2020
Status Closed New
Closed_Date 2020-09-19 19:02:27
Closed_By astridx
avatar astridx astridx - change - 19 Sep 2020
Status New Pending
avatar astridx astridx - reopen - 19 Sep 2020
avatar brianteeman
brianteeman - comment - 19 Sep 2020

as shown in the video if the last module manager page was with the admin modules selected then the add new module on the dashboard will offer to create a new admin module instead of a site module

avatar astridx
astridx - comment - 19 Sep 2020

@brianteeman

as shown in the video if the last module manager page was with the admin modules selected then the add new module on the dashboard will offer to create a new admin module instead of a site module

I like this. Why do you think it is a failure?

avatar brianteeman
brianteeman - comment - 20 Sep 2020

Simple. A link must always go to the same predictable place. If nothing else it is an accessibility failure and an unexpected behaviour that a link doesnt go where you think it will go because of an action you performed 4 hours earlier.

avatar astridx
astridx - comment - 20 Sep 2020

OK. I am no a11y expert. Then I close this here

avatar astridx astridx - close - 20 Sep 2020
avatar astridx astridx - change - 20 Sep 2020
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2020-09-20 13:00:26
Closed_By astridx
avatar pabloarias
pabloarias - comment - 29 Sep 2020

Hello:

I understand Brian, a link should be predictable, OK. But current behaviour, an empty list after using some filters (issue #30302), is not correct.

I think this solution by @astridx is the best we have right now. User has played with the filters by himself, so the link has not an terrible accessibility issue, user goes to a predictable place for him. I think it's the behaviour J3 has since years ago and it's useful.

Thank you and best regards

Add a Comment

Login with GitHub to post a comment