Please read and follow the COMMON ISSUES first!
Always add your version information in every new post! Thank you!

Form2Content Forum

Questions and answers for Form2Content, a Joomla CCK.
  1. Lorien
  2. Form2Content Lite & Pro
  3. Thursday, October 12 2017, 07:48 PM
  4.  Subscribe via email
The Save buttons on the backend for the article manager do not work so I cannot save any new articles or change existing ones. I've had this issue for a while. I was told to upgrade everything and I have but it is still not working. Any advice on where to look on how to fix this, I honestly do not have a clue where to start. Here is what I have below. The buttons do work in the content manager and everywhere else just not in the article manager for F2C. They also appear to work fine in the Regular Joomla Article manager.

PHP Version 7.0.7
Joomla! 3.8.1 Stable [ Amani ] 4-October-2017 14:00 GMT
F2C 6.16.0
Responses (4)
Lorien Accepted Answer Pending Moderation
I was able to find an error message

none.min.js:1 Uncaught ReferenceError: Joomla is not defined
at none.min.js:1
(anonymous) @ none.min.js:1

index.php?option=com_form2content&view=form&layout=edit&id=782:517 Uncaught TypeError: Cannot read property 'getValue' of undefined
at Object.Joomla.submitbutton (index.php?option=com_form2content&view=form&layout=edit&id=782:517)
at HTMLButtonElement.onclick (index.php?option=com_form2content&view=form&layout=edit&id=782:444)
Joomla.submitbutton @ index.php?option=com_form2content&view=form&layout=edit&id=782:517
onclick @ index.php?option=com_form2content&view=form&layout=edit&id=782:444
Lorien Accepted Answer Pending Moderation
I ended up commenting out a whole section of javascript. It look like it had html comment tags already and I removed those but didn't change anything so I commented out the whole section and it works now. However I'm not sure if this is important to leave, if there is a better fix. I don't necessarily want to take out a whole section of code when I'm not really sure what it does. I'm not so good with the code part of stuff.

<script type="text/javascript">
/*
<!--
var jTextUp = '<?php echo JText::_('COM_FORM2CONTENT_UP', true); ?>';
var jTextDown = '<?php echo JText::_('COM_FORM2CONTENT_DOWN', true); ?>';
var jTextAdd = '<?php echo JText::_('COM_FORM2CONTENT_ADD', true); ?>';
var jTextDelete = '<?php echo JText::_('COM_FORM2CONTENT_DELETE', true); ?>';
var jImagePath = '<?php echo JURI::root(true).'/media/com_form2content/images/'; ?>';
var jBusyUploading = '<p class="blockUI"><img src="/<?php echo JURI::root(true).'/media/com_form2content/images/'; ?>busy.gif" /> <?php echo JText::_('COM_FORM2CONTENT_BUSY_UPLOADING', true)?></p>';
var jBusyDeleting = '<p class="blockUI"><img src="/<?php echo JURI::root(true).'/media/com_form2content/images/'; ?>busy.gif" /> <?php echo JText::_('COM_FORM2CONTENT_BUSY_DELETING', true)?></p>';
var jExtensionUploadNotAllowed = '<?php echo JText::_('COM_FORM2CONTENT_EXTENSION_UPLOAD_NOT_ALLOWED', true); ?>';
<?php
echo $this->jsScripts['fieldInit'];
?>
Joomla.submitbutton = function(task)
{
if (task == 'form.cancel')
{
Joomla.submitform(task, document.getElementById('adminForm'));
return true;
}

if(!document.formvalidator.isValid(document.id('adminForm')))
{
alert('<?php echo $this->escape(JText::_('JGLOBAL_VALIDATION_FORM_FAILED'));?>');
return false;
}

var form = document.id('adminForm');

if(form.jform_catid.value == '')
{
alert('<?php echo sprintf(JText::_('COM_FORM2CONTENT_ERROR_FIELD_X_REQUIRED', true), JText::_($this->form->getFieldAttribute('catid', 'label'))); ?>');
return false;
}

<?php echo $this->jsScripts['validation']; ?>
if(!F2C_CheckRequiredFields(arrValidation)) return false;
Joomla.submitform(task, document.getElementById('adminForm'));
}
-->
*/
</script>
Lorien Accepted Answer Pending Moderation
I realized that the top portion of that allows me to load images so I revised my commenting and did the following. If anyone can let me know if there is a better way or if I am inadvertently messing something up I may not be aware of by commenting this out, please let me know.



<script type="text/javascript">
<!--
var jTextUp = '<?php echo JText::_('COM_FORM2CONTENT_UP', true); ?>';
var jTextDown = '<?php echo JText::_('COM_FORM2CONTENT_DOWN', true); ?>';
var jTextAdd = '<?php echo JText::_('COM_FORM2CONTENT_ADD', true); ?>';
var jTextDelete = '<?php echo JText::_('COM_FORM2CONTENT_DELETE', true); ?>';
var jImagePath = '<?php echo JURI::root(true).'/media/com_form2content/images/'; ?>';
var jBusyUploading = '<p class="blockUI"><img src="/<?php echo JURI::root(true).'/media/com_form2content/images/'; ?>busy.gif" /> <?php echo JText::_('COM_FORM2CONTENT_BUSY_UPLOADING', true)?></p>';
var jBusyDeleting = '<p class="blockUI"><img src="/<?php echo JURI::root(true).'/media/com_form2content/images/'; ?>busy.gif" /> <?php echo JText::_('COM_FORM2CONTENT_BUSY_DELETING', true)?></p>';
var jExtensionUploadNotAllowed = '<?php echo JText::_('COM_FORM2CONTENT_EXTENSION_UPLOAD_NOT_ALLOWED', true); ?>';
/*
<?php
echo $this->jsScripts['fieldInit'];
?>
Joomla.submitbutton = function(task)
{
if (task == 'form.cancel')
{
Joomla.submitform(task, document.getElementById('adminForm'));
return true;
}

if(!document.formvalidator.isValid(document.id('adminForm')))
{
alert('<?php echo $this->escape(JText::_('JGLOBAL_VALIDATION_FORM_FAILED'));?>');
return false;
}

var form = document.id('adminForm');

if(form.jform_catid.value == '')
{
alert('<?php echo sprintf(JText::_('COM_FORM2CONTENT_ERROR_FIELD_X_REQUIRED', true), JText::_($this->form->getFieldAttribute('catid', 'label'))); ?>');
return false;
}

<?php echo $this->jsScripts['validation']; ?>
if(!F2C_CheckRequiredFields(arrValidation)) return false;
Joomla.submitform(task, document.getElementById('adminForm'));
}
-->
*/
</script>
1 day ago Form2Content Lite & Pro # 2
Page : 1
Lorien Submit Your Response
BoldItalicUnderline---------------LinkPictureVideo---------------Bulleted listNumeric listList item---------------QuotesCodeGist---------------HappySmileSurprisedTongueUnhappyWink

F2C webmaster Accepted Answer Pending Moderation
Hi Lorien,

I'm not following exactly what you did but usually this issue is in the front-end when there is a Javascript conflict. This is most often caused by other plugins not handling certain events properly.

If you Google "Uncaught ReferenceError: Joomla is not defined" you will see many many causes. Let me try narrow down the possible conflict.

1) Are you using the default back-end template?
2) Can you test without WYSIWYG editor?
3) Are there specific back-end plugins, maybe editor buttons that can conflict?
4) Have you thoroughly cleared any JS cache... can be caused by that too.
5) Can you switch off any 3rd party (content) plugins?

Hope this gets us a step further.

Regards,
Patrick
Please read the F2C documentation before asking questions! Thank you if you've done so ;)
  • Page :
  • 1


There are no replies made for this post yet.
However, you are not allowed to reply to this post.