?
avatar ReLater
ReLater
28 Sep 2020

Steps to reproduce the issue

  • Maybe issue is not related to J4 core but I don't know for sure.

  • Updated a J 3.9.21 stepwise to Joomla 4 (current nightly).

  • Deactivate a module extension on Extensions > Manage where a module exists on Site Modules (image 000).

  • Go to Site Modules and select some modules.

  • I can select modules without issues one by one that are ordered in the list before "Newsletter".

  • See images 001 to 003 for modules that are ordered after module "Newsletter".

  • Green arrow: Here I clicked (select and deselect).

  • Orange arrow: The wrong selection afterwards.

image 000

000

image 001

001

image 002

002
002

image 003

003

System information (as much as possible)

System Information
Setting Value
PHP Built On Windows NT DELL-M6800 10.0 build 19041 (Windows 10) AMD64
Database Type mysql
Database Version 10.4.11-MariaDB
Database Collation utf8mb4_general_ci
Database Connection Collation utf8mb4_general_ci
Database Connection Encryption None
Database Server Supports Connection Encryption No
PHP Version 7.3.16
Web Server Apache/2.4.41 (Win64) OpenSSL/1.1.1c PHP/7.3.16
WebServer to PHP Interface apache2handler
Joomla! Version Joomla! 4.0.0-beta5-dev Development [ MaƱana ] 15-September-2020 19:15 GMT
User Agent Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36 Edg/85.0.564.63

Votes

# of Users Experiencing Issue
1/1
Average Importance Score
5.00

avatar ReLater ReLater - open - 28 Sep 2020
avatar joomla-cms-bot joomla-cms-bot - change - 28 Sep 2020
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 28 Sep 2020
avatar ReLater ReLater - change - 28 Sep 2020
The description was changed
avatar ReLater ReLater - edited - 28 Sep 2020
avatar ReLater
ReLater - comment - 4 Oct 2020

I have tested it now with a pure online nightly Joomla 4 and it has exactly the same issue.

  • Create modules in Position "breadcrumbs" or so if you have no demo data installed.
  • Create a modul "Articles Category".
  • Go to "Extensions manager" and deactivate "Articles Category" extension.
  • Go back to modules manager.
  • Fiddle like described in previous #30798 (comment)

04-10-_2020_05-44-50

Additional find: One can't reorder the deactivated module with Drag&Drop.

avatar jwaisner jwaisner - change - 5 Oct 2020
Status New Confirmed
avatar Quy
Quy - comment - 28 Oct 2020

@dgrammatiko Can you please advise changes to the following code to only add the click event to rows containing a checkbox input? Thank you!

  class JMultiSelect {
    constructor(formElement) {
      this.tableEl = document.querySelector(formElement);

      if (this.tableEl) {
        this.boxes = [].slice.call(this.tableEl.querySelectorAll('input[type=checkbox]'));
        this.rows = [].slice.call(document.querySelectorAll('tr[class^="row"]'));
        this.checkallToggle = document.querySelector('[name="checkall-toggle"]');

        this.onCheckallToggleClick = this.onCheckallToggleClick.bind(this);
        this.onRowClick = this.onRowClick.bind(this);

        if (this.checkallToggle) {
          this.checkallToggle.addEventListener('click', this.onCheckallToggleClick);
        }

        if (this.rows.length) {
          this.rows.forEach((row) => {
            row.addEventListener('click', this.onRowClick);
          });
        }
      }
    }
<tr class="row0" data-draggable-group="none">
  <td class="text-center">
  </td>
</tr>
<tr class="row1" data-draggable-group="none">
  <td class="text-center">
   <label for="cb3"><span class="sr-only">Select </span></label><input autocomplete="off" type="checkbox" id="cb3" name="cid[]" value="130" onclick="Joomla.isChecked(this.checked);">
  </td>
</tr>
avatar dgrammatiko
dgrammatiko - comment - 28 Oct 2020

@Quy sure, the problem is that for disabled rows the checkbox needs to render with a disabled attribute instead of skipping it. Basically the conditional here

<?php if ($item->enabled > 0) : ?>
<?php echo HTMLHelper::_('grid.id', $i, $item->id); ?>
<?php endif; ?>
is wrong. It always need to render a checkbox but if the row is disabled the checkbox needs to also have a disabled attribute (eg <?php echo HTMLHelper::_('grid.id', $i, $item->id); ?> needs to return always a checkbox but if needed with a disabled attribute)

avatar Quy
Quy - comment - 28 Oct 2020

Added the disabled attribute to checkbox. Clicking the checkbox does not toggle it, however, clicking the row/check all items checkbox toggles the checkbox.

30798

avatar dgrammatiko
dgrammatiko - comment - 28 Oct 2020

you need something like:

      if (this.boxes[currentCheckBox].disabled) {
        return;
      }
avatar Quy
Quy - comment - 28 Oct 2020

Almost there. The disabled checkbox can still be toggled using the Check All Items checkbox at the top. Thank you!

avatar brianteeman
brianteeman - comment - 21 May 2021

This appears to be resolved now as the last issue reported is no longer valid and this should be closed

avatar ReLater ReLater - change - 21 May 2021
Status Confirmed Closed
Closed_Date 0000-00-00 00:00:00 2021-05-21 16:20:50
Closed_By ReLater
avatar ReLater ReLater - close - 21 May 2021
avatar ReLater
ReLater - comment - 21 May 2021

If you say so I believe it ;-)

avatar Quy Quy - change - 21 May 2021
Status Closed New
Closed_Date 2021-05-21 16:20:50
Closed_By ReLater
avatar Quy Quy - reopen - 21 May 2021
avatar Quy
Quy - comment - 21 May 2021

This is reproducible.

Install Testing Sample Data.
Go to System > Manage > Extensions
Search and disable Wrapper - Site.
Go to System > Manage > Site Modules
Click Wrapper row.
The checkbox below it is checked.

avatar ReLater
ReLater - comment - 21 May 2021

Thanks @Quy for reopening! I have confused this with another selection failure pr (menu assignment)

avatar brianteeman
brianteeman - comment - 21 May 2021

What am I doing wrong then

modules

avatar dgrammatiko
dgrammatiko - comment - 21 May 2021

@brianteeman try to select the next module after the disabled one

avatar brianteeman
brianteeman - comment - 21 May 2021

ah - it selects the next two. got it now

avatar infograf768
infograf768 - comment - 28 May 2021

See demo of problem here in the NOTE
#34238 (comment)

avatar infograf768
infograf768 - comment - 28 May 2021

Why don't we simply do

						<td class="text-center">
							<?php echo HTMLHelper::_('grid.id', $i, $item->id, false, 'cid', 'cb', $item->title); ?>
						</td>

imho, it does not matter if we can tick the disabled item checkbox and use Actions as it does not change its disabled status.

avatar brianteeman
brianteeman - comment - 28 May 2021

thats not a good solution as it provides a negative user experience which was the entire point in the checkbox being removed in the first place.

avatar bembelimen
bembelimen - comment - 28 May 2021

TBH, I'm more surprised when the checkbox is removed at all, because then I have to think and guess and have to make a connection: no checkbox? why? mhh, because it's disabled (says the icon at least).

If there would be an disabled checkbox with information why it's disabled, then I don't have to think myself...

avatar infograf768
infograf768 - comment - 28 May 2021

thats not a good solution as it provides a negative user experience which was the entire point in the checkbox being removed in the first place.

Certainly less negative than what we have now. The module can anyway be edited although it is disabled. Taking off the checkbox makes no sense.

Concerning the explanation, I guess using a real tooltip as proposed here would do the job.#34238 (comment)

avatar dgrammatiko
dgrammatiko - comment - 28 May 2021

thats not a good solution as it provides a negative user experience which was the entire point in the checkbox being removed in the first place.

Whoever removed the checkbox for the disabled items did a very poor job as they broke at least 3 scripts: drag and drop, multiselect and select all. Can it be done without a checkbox for disabled items? Yes but all 3 scripts need to be adjusted and honestly, it's far easier to bringback the checkbox as I already guided @Quy in my comments above

avatar bembelimen
bembelimen - comment - 28 May 2021

thats not a good solution as it provides a negative user experience which was the entire point in the checkbox being removed in the first place.

Whoever removed the checkbox for the disabled items did a very poor job as they broke at least 3 scripts: drag and drop, multiselect and select all. Can it be done without a checkbox for disabled items? Yes but all 3 scripts need to be adjusted and honestly, it's far easier to bringback the checkbox as I already guided @Quy in my comments above

  • Deletion of this entry is also not possible anymore...
avatar infograf768
infograf768 - comment - 28 May 2021

The use of <?php if ($item->enabled > 0) : ?> for the checkbox was introduced in J3.5.0
#8020

avatar chmst
chmst - comment - 28 May 2021

If a component is disabled, we remove the link in the menu to this component. No Tooltip, no ghost componetnt - disabled means disabled. Why not hide disabled module instances from the list?

avatar dgrammatiko
dgrammatiko - comment - 28 May 2021

Why not hide disabled module instances from the list?

Actually, I wouldn't expect the list all modules to display only rows for modules that are enabled. In fact, I would expect when a module row indicated that the module is disabled and I enable (publish) that row then the module will be enabled automatically instead of having to go to the extensions to enable the module and come back to publish the row. It seems that we're making things hard for no reason

Also if you hide rows like that in case I uninstall a module I have no way to remove any remaining related data in the database

avatar chmst
chmst - comment - 28 May 2021

I see this: A disabled module is not in the select screen (com_modules&view=select).
Because it is disabled and may not be used - maybe old PHP version or whatever the reason is for the administrator.
If another user could publish it in the same way as a unpublished module in (com_modules&view=modules), this would be contrary to the intention of disabling the module.

avatar chmst
chmst - comment - 28 May 2021

In any case, re-adding the checkbox and disabling it so that no action is possible would at least solve the problem of the missing checkbox

avatar infograf768
infograf768 - comment - 29 May 2021

In any case, re-adding the checkbox and disabling it so that no action is possible would at least solve the problem of the missing checkbox

Except, as @bembelimen rightfully remarked, that one can't delete the instance of the module concerned via the admin UI.
Very different from not displaying the menu link to the component.

avatar chmst
chmst - comment - 29 May 2021

Just saying: In j3 disabled module items are not shown in the list. It is true that the items remain as ghost in the database.

avatar infograf768
infograf768 - comment - 29 May 2021

The difference in J3 is that a blocked module can't be disabled.
Therefore the test should be done with a non-blocked module.

avatar ReLater
ReLater - comment - 29 May 2021

In j3 disabled module items are not shown in the list.

In my case they are shown:
29-05-_2021_11-18-07

avatar infograf768
infograf768 - comment - 29 May 2021

Yep. Same for Most Read because it is not blocked.

Screen Shot 2021-05-29 at 11 20 54

avatar infograf768
infograf768 - comment - 29 May 2021

J3 list of protected modules

Screen Shot 2021-05-29 at 11 23 02

avatar Fedik
Fedik - comment - 29 May 2021

I have added checkbox, please test #34273

avatar Fedik Fedik - change - 29 May 2021
Status New Closed
Closed_Date 0000-00-00 00:00:00 2021-05-29 17:50:33
Closed_By Fedik
avatar Fedik Fedik - close - 29 May 2021
avatar Fedik
Fedik - comment - 29 May 2021

closing it, because PR

Add a Comment

Login with GitHub to post a comment