avatar aschkenasy
aschkenasy
25 Mar 2022

Steps to reproduce the issue

  • in any list tmpl, in the tables add a secondary without grid checkbox
  • navigate to admin list
  • select the second checkbox

Expected result

only second checkbox should be checked

Actual result

second and fourth checkboxes are checked

System information (as much as possible)

vanilla 4.1.0 stable installation
php 8.0.16
Apache 2.4.52
(lando lamp container)

Additional comments

This happens for any component.
seemingly connected to class="row<?php echo $i % 2; ?>" as without it, it works as expected.

simplest way to reproduce:

in administrator\components\com_content\tmpl\articles\default.php in the <tbody> add

<tr class="row<?php echo $i % 2; ?>">
    <td class="d-none d-lg-table-cell">
        <?php echo (int) $item->id; ?>
    </td>
</tr>

before the <?php endforeach; ?>

clicking on the second row produces the bug.

remove the class="row<?php echo $i % 2; ?>" class and it works fine.

avatar aschkenasy aschkenasy - open - 25 Mar 2022
avatar drmenzelit
drmenzelit - comment - 25 Mar 2022

I can't follow... what are you trying to achieve? What is the purpose of this new table row?

avatar aschkenasy
aschkenasy - comment - 25 Mar 2022

any item is currently displayed as single row in the list table. however, in template overrides (or in custom components) item info might need to be displayed over two rows. (imagine if you want to show the introtext of an article). in table design (as atum template is) this can be achieved by adding the additional row with a colspan td where this info can be displayed.
however, that tr cant have the row class which of course would be a problem for styling etc.

avatar aschkenasy
aschkenasy - comment - 25 Mar 2022

I think the real issue is that the js relies on some odd calculations involving class names...

avatar brianteeman
brianteeman - comment - 25 Mar 2022

I dont get what you are trying to do either. There are lots of uses in core where a cell is on multiple lines without needing to be in a second row.

avatar aschkenasy
aschkenasy - comment - 25 Mar 2022

github
This is just one example of what can be done with double rows.. This is for articles (to ensure the bug exists in core).

avatar brianteeman
brianteeman - comment - 25 Mar 2022

I'm not disputing that you have identified an issue I am just not convinced at all that it is something we should "fix". From your example its not just the checkbox select that breaks. The complete loss of table headers results in a broken table which fails accessibility.

Semantically a table row should contain a complete record. I am assuming that the motivation for your work is due to the limitation in the number of columns that can be easily displayed on a screen without scrolling laterally. This is considerably improved in 4.2 with the user selectable option to chose which columns to display.

avatar aschkenasy aschkenasy - change - 26 Mar 2022
Status New Closed
Closed_Date 0000-00-00 00:00:00 2022-03-26 00:09:14
Closed_By aschkenasy
avatar aschkenasy aschkenasy - close - 26 Mar 2022
avatar aschkenasy
aschkenasy - comment - 26 Mar 2022

@brianteeman sounds good. thx.

Add a Comment

Login with GitHub to post a comment