In the joomla front end create a form containing a joomla-toolbar-button which contains a task="mycontroller.task" type attribute, and include in the contents of the joomla-toolbar-button, a button with a name/value pair.
On pressing the button, the name/value pair should be sent to the server.
In Firefox, the name/value pair are not sent to the server, whereas they are with Edge & Chrome.
If you omit the task="mycomponent.task" part of the joomla-toolbar-button, then Firefox seems to work ok.
Joomla 5.1.4, PHP 8.2.7, standard Linux box.
| Labels |
Removed:
?
|
||
| Labels |
Added:
No Code Attached Yet
|
||
| Labels |
Added:
bug
|
||
tried/tested a fix just for the component, and it works in Firefox without any changes to global core.js.
In build\media_source\system\js\joomla-toolbar-button.w-c.es6.js
in executeTask():
Added event.preventDefault() to stop native submit conditions.
Injected the clicked button's name/value as a hidden right before Joomla.submitbuton() gets fired.
I know it's band aid but it safely solves the issue for this specific component.
Would this approach be acceptable, if yes I will do a PR
| Status | New | ⇒ | Closed |
| Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2026-03-14 15:04:37 |
| Closed_By | ⇒ | Fedik |
The Toolbar buttons designed to trigger:
Joomla.submitbutton(task, form, formValidation);Nothing more.
This code will set the value for the field task and submit the form.
The form itself should have a hidden field with name task.
To do what you is asking you have to use regular form <button>.
I am closing the issue.
Thanks for report.
looked into this to see if I could fix, the issue happens because Joomla's Js eventually calls form.submit() and accordng to HTML specs , programmatic submission drops the submitter button's name/value payload.
and Firefox strictly follows this rule, while Chrome/Edge are lenient.
A proper architectural fix probably requires updating Joomla.submitbutton() in the core to use the modern form.requestSubmit(submitter) API.
Leaving this note here with my findiings it might be helpful for whoever tries fixing it : )