I have been facing a problem when I try to update the article from the frontend then it shows this error

Joomla.submitbutton is not a function at HTMLButtonElement.onclick

Here is my code

<div class="btn-group">
            <button type="button" class="btn btn-primary" onclick="Joomla.submitbutton('article.save')">
                <span class="icon-ok"></span><?php echo JText::_('JSAVE') ?>


I am also facing this error

Uncaught TypeError: Joomla.getOptions is not a function

Which if I go to the source code I find this script

    headers: {
        'X-CSRF-Token': Joomla.getOptions('csrf.token')

And that script is not visible in the actual file

  • Is this an issue you're having with Joomla core, a 3rd party extension or your own code?
    – Lodder
    Jan 8, 2019 at 8:15
  • @Lodder core joomla Jan 8, 2019 at 8:20
  • And are you using the latest version of Joomla?
    – Lodder
    Jan 8, 2019 at 8:23
  • Yes joomla version is 3.9.1 Jan 8, 2019 at 8:26
  • It looks like that Joomla javascript library is not loaded somehow on the page. That's the only thing I can imagine in this case, if this is inside a core Joomla function of a core component. Thus the above mentioned functions cannot be recognized as functions. Or it could be a javascript conflict with another javascript library.
    – Zollie
    Jan 8, 2019 at 18:08

2 Answers 2


I have found the solution. I have removed the javascript like onclick="Joomla.submitbutton('article.save')" from the form view of com_content and added the necessary php code to make form submit to the right direction. Now the form is working fine

  • Please award the green tick to the best answer that resolved your question (this may or may not be your own answer). By accepting an answer, you mark the page as resolved and site's automated scripts will stop bumping this page for new attention. Jan 5, 2021 at 18:35

Just curious if you're working with a template override of the form.

Reason I'm asking is the function Joomla.submitbutton is typically added to the page by the template for the form.

Also, Joomla.getOptions is defined in core.js, which templates can avoid or block loading.

My guess is you're using a template that has decided for whatever reason to stop Joomla from loading the minimal javascript it needs, and the developer either wasn't aware of the right way to do that or didn't care about the side effects.

Pro tip: if you made the changes you mention directly to the core files, like your words implied, you have at most 6 months before an update breaks things by overwriting them. That's why template overrides exist.

This site is temporarily in read-only mode and not accepting new answers.

Not the answer you're looking for? Browse other questions tagged .