Page 1 of 1
Javascript error in backend since update to 3.0.9 on marker form
Posted: 13 Nov 2020, 21:31
by xillibit
Hello,
Since the update to phoca maps 3.0.9, in the marker form in backend, i can't open the modal windows to define the marker position. In browser console i have this error :
Code: Select all
Uncaught SyntaxError: missing ) after argument list at index.php:254:42
Re: Javascript error in backend since update to 3.0.9 on marker form
Posted: 17 Nov 2020, 17:24
by Jan
Hi, testing now, everything is working OK for me:
(edit an marker, opened modal window)
Are you able to navigate with your javascript error console directly to the code where this occurs? (clicking on error message should link to code)
Do you use OSM or Google Maps?
It is unlikely that the package will be damaged, but try downloading the installation package again and try to reinstall Phoca Maps with the same version
Jan
Re: Javascript error in backend since update to 3.0.9 on marker form
Posted: 17 Nov 2020, 19:16
by xillibit
Hello,
I'am using OSM, when i navigate to the code from the console it goes here :
So it seems it doesn'nt likes the quotes in the french translation
Re: Javascript error in backend since update to 3.0.9 on marker form
Posted: 17 Nov 2020, 22:08
by Jan
Hi, thank you for the info, please open this file:
administrator\components\com_phocamaps\views\phocamapsmarker\tmpl\edit.php
and edit
FROM:
Code: Select all
JFactory::getDocument()->addScriptDeclaration(
'Joomla.submitbutton = function(task) {
if (task != \''. $this->t['task'].'.cancel\' && document.getElementById(\'jform_catid\').value == \'\') {
alert(\''.$this->escape(JText::_('JGLOBAL_VALIDATION_FORM_FAILED')) . ' - '. $this->escape(JText::_('COM_PHOCAMAPS_ERROR_MAP_NOT_SELECTED')).'\');
} else if (task == "'. $this->t['task'].'.cancel" || document.formvalidator.isValid(document.getElementById("adminForm"))) {
Joomla.submitform(task, document.getElementById("adminForm"));
} else {
Joomla.renderMessages({"error": ["'. JText::_('JGLOBAL_VALIDATION_FORM_FAILED', true).'"]});
}
}'
);
TO:
Code: Select all
JFactory::getDocument()->addScriptDeclaration(
'Joomla.submitbutton = function(task) {
if (task != \''. $this->t['task'].'.cancel\' && document.getElementById(\'jform_catid\').value == \'\') {
alert(\''.JText::_('JGLOBAL_VALIDATION_FORM_FAILED', true) . ' - '. JText::_('COM_PHOCAMAPS_ERROR_MAP_NOT_SELECTED', true).'\');
} else if (task == "'. $this->t['task'].'.cancel" || document.formvalidator.isValid(document.getElementById("adminForm"))) {
Joomla.submitform(task, document.getElementById("adminForm"));
} else {
Joomla.renderMessages({"error": ["'. JText::_('JGLOBAL_VALIDATION_FORM_FAILED', true).'"]});
}
}'
);
This should fix it. Please let me know. I will change it for next version.
Thank you, Jan
Re: Javascript error in backend since update to 3.0.9 on marker form
Posted: 17 Nov 2020, 23:04
by xillibit
I have applied this change, it works
Thanks
Re: Javascript error in backend since update to 3.0.9 on marker form
Posted: 18 Nov 2020, 00:00
by Jan
Great to hear it, I will change it for next version.
Thank you, Jan