It began recently, with what is connected - it is not clear. Transfer to another hosting is not done. When you click on the "Save" button, "Save and close", etc., an error appears in the console: screenshot

Uncaught TypeError: Cannot read property "isValid" of undefined at Object.Joomla.submitbutton (index.php? Option = com_modules & view = module & layout = edit & id = 217: 37) at HTMLAnchorElement.onclick (index.php? Option = com_modules & view = module & layout = edit & id = 217: 258)

Here are some tips on how to fix the problem with broken save buttons.

In the file administrator / components / com_modules / views / module / tmpl / edit.php, replacing id = "Module-form" with id = "adminForm" does not help.

Changing the version of php on the hosting does not help. There are several to choose from 5.2 to 7.2, but the site only works with versions 5.3 and 5.4, and if you choose one or the other, the problem does not disappear.

Changing the control panel template does not help.

Replacing the entire administrator folder with a folder from the distribution does not help (via FTP with file replacement).

Here is the contents of the file administrator / components / com_modules / views / module / tmpl / edit.php: https://jsfiddle.net/9tb7m5su/

$hasContent = empty($this->item->module) || $this->item->module == 'custom' | | $this->item->module == 'mod_custom'; $script = "Joomla.submitbutton = function(task) { if (task == 'module.cancel' || document.formvalidator.isValid(document.id('module-form'))) {"; if ($hasContent) { $script .= $this->form->getField('content')->save(); } $script .= " Joomla.submitform(task, document.getElementById('module-form')); if (self != top) { window.top.setTimeout('window.parent.SqueezeBox.close()', 1000); } } else { alert('".$this->escape(JText::_('JGLOBAL_VALIDATION_FORM_FAILED'))."'); } }"; JFactory::getDocument()->addScriptDeclaration($script); ?> <form action="<?php echo JRoute::_('index.php? option=com_modules&layout=edit&id='.(int) $this->item->id); ?>" method="post" name="adminForm" id="module-form" class="form-validate"> <div class="width-60 fltlft"> <fieldset class="adminForm"> 

    1 answer 1

    Inga, you need to find this file:

    www.tvoi_domen.ru/media/system/js/validate.js

    Add the following line to the end of this file:

    document.formvalidator = new JFormValidator;

    Then open this file in the browser by going to www.tvoi_domen.ru/media/system/js/validate.js and update it several times (ctrl + F5). Now log out and log in to the Joomla dashboard. Everything should work.