Uncaught TypeError: Cannot read property 'elements' of null

11 months 3 weeks ago - 11 months 2 weeks ago #69766 by jrodgar
I have this error on the front
Uncaught TypeError: Cannot read property 'elements' of null
    at HTMLDocument.<anonymous> ((index):108)
    at i (jquery.min.js?bd03da1e8dd40079480e9a1485854824:2)
    at Object.fireWith [as resolveWith] (jquery.min.js?bd03da1e8dd40079480e9a1485854824:2)
    at Function.ready (jquery.min.js?bd03da1e8dd40079480e9a1485854824:2)
    at HTMLDocument.K (jquery.min.js?bd03da1e8dd40079480e9a1485854824:2)

Related code, it fails when there is not adminForm:
jQuery(document).ready(function() {
			var form=document.getElementById("adminForm");
			jQuery(form.elements).filter("input:not(.fc_autosubmit_exclude), select:not(.fc_autosubmit_exclude)").on("change", function() {
				adminFormPrepare(form, 2);
			});
			jQuery(form).attr("data-fc-autosubmit", "2");
		});

Joomla 3.8, Flexicontent 3.2.1.4

Unless otherwise indicated:
Joomla 3.8.1
Flexicontent 3.2.1.7

Please Log in or Create an account to join the conversation.

11 months 3 weeks ago #69767 by jrodgar
Nevermind, I had updated flexicontent, but not the templates overrides, I have yet to update them and confirm that they work properly

Sorry for bothering you

Unless otherwise indicated:
Joomla 3.8.1
Flexicontent 3.2.1.7

Please Log in or Create an account to join the conversation.

11 months 3 weeks ago #69768 by ggppdk
Hello

name of form needs to be 'adminForm'

check you custom templates for
<form name="adminForm" ...

maybe name="adminForm" is missing


-- FLEXIcontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star review. Thanks!

Please Log in or Create an account to join the conversation.

11 months 2 weeks ago #69785 by jrodgar
For the record, the problem was that in my template, I didnt´ add the component mark for the homepage (because is module based), but I had added a flexicontent category as homepage, so although it didnt appear, the scripts where added anyways

Unless otherwise indicated:
Joomla 3.8.1
Flexicontent 3.2.1.7

Please Log in or Create an account to join the conversation.

Moderators: vistamediajoomlacornerggppdk
© 2018 Flexicontent. All Rights Reserved.