Edit Bar Goes Blank after a script instalation
Permalink
Hey, I have made over 10 C5 sites and this happens on all of them. I just used to blow it off, but now its getting to me.
Every time I add the following code to any page it makes the edit bar go blank. It doesn't matter where I put it on the page. There probably is a simple work-around.
Basically this script is running a simple "feedback" style button that pops up a form
Every time I add the following code to any page it makes the edit bar go blank. It doesn't matter where I put it on the page. There probably is a simple work-around.
<script src="http://cdn.jotfor.ms/static/feedback2.js?3.1.1143" type="text/javascript"> new JotformFeedback({ formId : "30636937958167", buttonText : "Sow a Seed to INK", base : "http://jotform.us/", background : "#FFFFFF", fontColor : "#51a1d6", buttonSide : "left", buttonAlign : "center", type : 1, width : 700, height : 500 }); </script>
Basically this script is running a simple "feedback" style button that pops up a form
What does the browser developer console report? I expect there are some error messages.
This is what I get when Launch the page into edit mode:
Uncaught TypeError: Cannot read property 'dialog' of undefined ccm.app.js?v=389a9359c404accf3d772fc9b76d0e24:3 (anonymous function) ccm.app.js?v=389a9359c404accf3d772fc9b76d0e24:3 Uncaught ReferenceError: ccm_menuInit is not defined index.php?cID=1&ctask=check-out&ccm_token=1386013504:2ecd7b5d9ac9d4c226329bd8bc23c903:92 (anonymous function) index.php?cID=1&ctask=check-out&ccm_token=1386013504:2ecd7b5d9ac9d4c226329bd8bc23c903:92 o jquery.js?v=389a9359c404accf3d772fc9b76d0e24:2 p.fireWith jquery.js?v=389a9359c404accf3d772fc9b76d0e24:2 e.extend.ready jquery.js?v=389a9359c404accf3d772fc9b76d0e24:2 c.addEventListener.B jquery.js?v=389a9359c404accf3d772fc9b76d0e24:2 Uncaught TypeError: Object [object Object] has no method 'on' bootstrap.js?v=389a9359c404accf3d772fc9b76d0e24:1 (anonymous function) bootstrap.js?v=389a9359c404accf3d772fc9b76d0e24:1 e.resolveWith feedback2.js?3.1.1179:2 e.extend.ready feedback2.js?3.1.1179:2 c.addEventListener.C feedback2.js?3.1.1179:2
I assume this is where the issue lies:
Uncaught ReferenceError: ccm_menuInit is not defined index.php?cID=1&ctask=check-out&ccm_token=1386013504:2ecd7b5d9ac9d4c226329bd8bc23c903:92
(anonymous function) index.php?cID=1&ctask=check-out&ccm_token=1386013504:2ecd7b5d9ac9d4c226329bd8bc23c903:92
o jquery.js?v=389a9359c404accf3d772fc9b76d0e24:2
p.fireWith jquery.js?v=389a9359c404accf3d772fc9b76d0e24:2
e.extend.ready jquery.js?v=389a9359c404accf3d772fc9b76d0e24:2
c.addEventListener.B jquery.js?v=389a9359c404accf3d772fc9b76d0e24:2
Uncaught ReferenceError: ccm_menuInit is not defined index.php?cID=1&ctask=check-out&ccm_token=1386013504:2ecd7b5d9ac9d4c226329bd8bc23c903:92
(anonymous function) index.php?cID=1&ctask=check-out&ccm_token=1386013504:2ecd7b5d9ac9d4c226329bd8bc23c903:92
o jquery.js?v=389a9359c404accf3d772fc9b76d0e24:2
p.fireWith jquery.js?v=389a9359c404accf3d772fc9b76d0e24:2
e.extend.ready jquery.js?v=389a9359c404accf3d772fc9b76d0e24:2
c.addEventListener.B jquery.js?v=389a9359c404accf3d772fc9b76d0e24:2
It looks like you are having a jQuery conflict.
As Mkly observes, one possibility is your code is trying to load jquery twice from 2 different palaces. Another is that code that needs jQuery is running before jQuery is initialised.
The second issue may be resolved by putting new JotFormFeedback.... inside a jQuery ready handler.
The first issue will show up in the network tab of the developer console as >1 loads of jquery.js
The second issue may be resolved by putting new JotFormFeedback.... inside a jQuery ready handler.
The first issue will show up in the network tab of the developer console as >1 loads of jquery.js