No Code Attached Yet bug
avatar jhrenshaw
jhrenshaw
14 Oct 2024

Steps to reproduce the issue

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.

Expected result

On pressing the button, the name/value pair should be sent to the server.

Actual result

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.

System information (as much as possible)

Joomla 5.1.4, PHP 8.2.7, standard Linux box.

Additional comments

Votes

# of Users Experiencing Issue
1/1
Average Importance Score
3.00

avatar jhrenshaw jhrenshaw - open - 14 Oct 2024
avatar jhrenshaw jhrenshaw - change - 14 Oct 2024
Labels Removed: ?
avatar joomla-cms-bot joomla-cms-bot - change - 14 Oct 2024
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 14 Oct 2024
avatar Hackwar Hackwar - change - 28 Nov 2024
Labels Added: bug
avatar Hackwar Hackwar - labeled - 28 Nov 2024
avatar krishnagandhicode
krishnagandhicode - comment - 14 Mar 2026

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 : )

avatar krishnagandhicode
krishnagandhicode - comment - 14 Mar 2026

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

avatar Fedik Fedik - change - 14 Mar 2026
Status New Closed
Closed_Date 0000-00-00 00:00:00 2026-03-14 15:04:37
Closed_By Fedik
avatar Fedik Fedik - close - 14 Mar 2026
avatar Fedik
Fedik - comment - 14 Mar 2026

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.

Add a Comment

Login with GitHub to post a comment