This is a pure PHP issue, that doesn't effect Joomla core, but Joomla core provides and exposes this API for others to use.
A developer can add an edit button on a List view to allow editing of items. In fact the default addToolbar
method in the MVC
layer of Joomla also provides this edit button
You can replicate this by adding ToolbarHelper::editList('article.edit');
to the Articles HtmlView.php
toolbar and then checking all your articles and then clicking edit.
When using ToolbarHelper::editList('article.edit');
API, the page checks with javascript how many items are checked, before submitting the form.
The expected behaviour is like this (in the versions modal)
If more than one item is checked, then you are told to only select one item to edit
No validation of the checkboxes number checked, and form submits and the edit page of the first item checked is loaded.
Labels |
Added:
?
|
This was already 2008 when I made my first Joomla installation. Nobody had a problem with that until now.
Actually I've always had a problem with it and its been reported several times but always rejected
reported several times but always rejected
I dont know why - it is clearly wrong and should be fixed. However now that Joomla 4 no longer has any edit buttons, it might be just as easy to deprecate the edit toolbar completely instead.
The edit button for an items list is used widely by extensions developers, but the behavior has always been almost the same on J3. The only difference is that J4 does not enable the edit button when the check all checkbox is clicked, but only when single items are selected one by one. Then the first item is edited. Probably it would be the time to make this behavior consistent in J4, for example introducing a JS validation... i guess that the best option would be to prevent the form to submit if there are multiple items selected.
Probably a quick easy fix in JS for @dgrammatiko :)
Probably a quick easy fix in JS for @dgrammatiko :)
I'll call @Fedik for this one :)
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2022-03-07 18:37:14 |
Closed_By | ⇒ | PhilETaylor | |
Labels |
Added:
No Code Attached Yet
Removed: ? |
Maybe it's better to make the button disabled when more than one checkbox checked?