Same function, on Joomla 5:
public static function id($rowNum, $recId, $checkedOut = false, $name = 'cid', $stub = 'cb', $title = '', $formId = null)
{
if ($formId !== null) {
return $checkedOut ? '' : '<label for="' . $stub . $rowNum . '"><span class="visually-hidden">' . Text::_('JSELECT')
. ' ' . htmlspecialchars($title, ENT_COMPAT, 'UTF-8') . '</span></label>'
. '<input class="form-check-input" type="checkbox" id="' . $stub . $rowNum . '" name="' . $name . '[]" value="' . $recId
. '" onclick="Joomla.isChecked(this.checked, \'' . $formId . '\');">';
}
return $checkedOut ? '' : '<label for="' . $stub . $rowNum . '"><span class="visually-hidden">' . Text::_('JSELECT')
. ' ' . htmlspecialchars($title, ENT_COMPAT, 'UTF-8') . '</span></label>'
. '<input class="form-check-input" autocomplete="off" type="checkbox" id="' . $stub . $rowNum . '" name="' . $name . '[]" value="' . $recId
. '" onclick="Joomla.isChecked(this.checked);">';
}
Labels |
Added:
No Code Attached Yet
|
Where exactly do you think this is missing?
Checked some files and in 6.0 should be there.
Frontend or backend?
Could you give an example?
We are talking about backend.
Can you please give an example code how you create the toolbar for your backend views.
As mentioned, the asset should be included automatically.
Only trying to find out why this is missing for you both.
We are talking about which version - 5 or 6?
Appreciate your support to find the potential issue.
Hi,
Yes, on my extension, I use the code below to create a checkbox for each row:
HTMLHelper::_('grid.id', $i, $item->id, false);
With Joomla 5, when this checkbox is checked, the toolbars will be enabled and the user can delete, publish... However, on Joomla 6 beta, it does not work. But if I check the check all button (Joomla.checkAll), it still works fine.
@LadySolveig I not tested, but from quick look it seems missing in Joomla\CMS\HTML\Helpers\Grid::id()
and Joomla\CMS\HTML\Helpers\Grid::checkall()
, but last one still use inline JS so can ignore for now.
Thank you @Fedik pointing in the right direction.
In the core itself, it is necessary to comment out at least two places to trigger the issue.
Would be helpful if you could test the fix with the affected components. @jlexart-joomla @joeforjoomla
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2025-09-15 13:23:15 |
Closed_By | ⇒ | richard67 |
Confirmed.
Found out that /media/system/js/list-view.min.js is no longer included and requires to be added explicitely:
$document->getWebAssetManager()->useScript('list-view');