Labels |
Added:
No Code Attached Yet
|
Hi Christiane,
I get these problems in my extensions where it worked in RC/Beta versions but not more in Stable. Maybe, it seems like some problem when moving from BS4 to BS5. It occurs by batch buttons, where standard code:
HTMLHelper::_('bootstrap.renderModal', 'collapseModal'); ... $bar->appendButton('Custom', $dhtml, 'batch');
does not work anymore (throws this error). It looks like I need to find another solution.
Anyway, will be great to get some info about all the changes which happened between Beta and Stable, because a lot of code which was overwritten for Beta does not more work in Stable. :-(
Thank you, Jan
@PhocaCz In my extensions, I use the same code as in J3 and it still works https://github.com/joomla/joomla-cms/blob/3.10-dev/administrator/components/com_content/views/articles/view.html.php#L182-L188
If it is really needed, maybe you can attach a copy of your extension here and tell us where the code is used and have problem. Maybe someone could look at it and give you correct code to use (hope so :) )
@joomdonation Did you test it in stable? I use exactly the same code as you are using and it worked OK in beta/rc but in stable it throws now error. :idea:
Jan
@PhocaCz Yes. I tested it, the modal opens OK, so I did not check the console for that js error. Don't have time to check to see what's causing that error now but quick modification to use the following code solves the issue for me. Maybe you can try
$bar = JToolbar::getInstance('toolbar');
$bar->popupButton('batch')
->text('JTOOLBAR_BATCH')
->selector('collapseModal')
->listCheck(true);
@joomdonation Yes, this did the trick, now the batch function works without any error and the produced output is OK (including BS5 attributes):
<joomla-toolbar-button id="toolbar-batch" list-selection="">
<button value="http://localhost/xxx/administrator/" class="button-batch btn btn-primary" type="button" data-bs-toggle="modal" data-bs-target="#collapseModal">
<span class="icon-square" aria-hidden="true"></span>
Batch</button>
</joomla-toolbar-button>
Thank you, Jan
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2021-08-29 10:56:35 |
Closed_By | ⇒ | PhocaCz |
Which Batch button? I cannot replicate this error in com_content, com_contact, com_odules. Can you give more information please?
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/35394.