Jump to content

Archived

This topic is now archived and is closed to further replies.

Jeremiah

[Solved] Platform 5, Page editor won't load with added javascript.

Recommended Posts

Jeremiah

Error: editing.js?ver=930684:5 Uncaught TypeError: Cannot read property 'getData' of undefined

I have all of the plugins disabled and I still receive the error.

Page Editor will not load on page.

 

Share this post


Link to post
Share on other sites
Simon

You mentioned in the support ticket the following:

Quote

Pagelines page editor on the right is not functioning with a javascript I am using.

What javascript are you using?

Share this post


Link to post
Share on other sites
Simon

This topic has been marked as solved.

Share this post


Link to post
Share on other sites
Simon

This is a simple fix, here is the code that was supplied

<!-- Start LoanTek Widget Code -->
<div id="FORM_DIV"></div>
<div id="RESPONSE_DIV"></div>
<script type="text/javascript" src="https://clients.loantek.com/widgets/quotewidget-2.2.js"></script>
<script type="text/javascript">
window.onload = function () {
LoanTek.QuoteWidget({ PartnerID: xxx });
LoanTek.init();
}
</script>
<!-- End LoanTek Widget Code -->

Troble here is including remode scripts like this pasted from the internet tends to break all scripts that follow it.

Scripts HAVE to be in the header or footer.

Solution

  1. Put the script elements into the scripts area in the global settings area. Thats what its for.
  2. Add the HTML elements ( the two divs in your example ) into your page via a media section.

 


 

Share this post


Link to post
Share on other sites
Jeremiah

   I tried both ways in header and out of header I get the same error.

editing.js?ver=d12006:5 Uncaught TypeError: Cannot read property 'getData' of undefined

Share this post


Link to post
Share on other sites
Simon

Right send me a login.

Ive tested this with your code and it works perfectly fine.

Share this post


Link to post
Share on other sites
Jeremiah

Okay I emailed it.

Share this post


Link to post
Share on other sites
Simon

Right after closer examination, your widget code includes an old version of jQuery. You cant run 2 different versions of that library on a page without breakage.

So a workaround.

Ive added the snippet back into your page in a media section, to edit your page you will have to add &plsafemode to your url to stop that widget breaking the entire builder.

Thats the only thing I can suggest as we cant stop the widget loading its old jquery libs.

Also you will encounter breakage if you add any other section/plugins that rely on jQuery as there are conflicting versions being loaded.

Share this post


Link to post
Share on other sites
Jeremiah

Should I contact the author of the code and see if there will be an update to the jQuery?

Thank you for all your help.

Share this post


Link to post
Share on other sites
Simon

Probably not worth it, they will still load jquery on the page as they need it for their widget.

This is the problem with copy/paste solutions, they design it to work on any page for end users with zero coding experience, they will never update that code for one person.

 

Share this post


Link to post
Share on other sites
Jeremiah

&plsafemode is not working in the URL? 

Share this post


Link to post
Share on other sites
Simon

Yes it does as long as you are logged in, I used it on your site.

Share this post


Link to post
Share on other sites
Jeremiah

I must be doing something wrong. I get a 404 message. Please explain it.

Share this post


Link to post
Share on other sites
Simon
  1. login to your site and navigate to the page with the issue.
  2. Start the builder.
  3. In your browser url bar add &plsafemode to the end of the url and click enter.

Share this post


Link to post
Share on other sites
Jeremiah

Thank You I wasn't starting the builder first. I appreciate your patience.

Share this post


Link to post
Share on other sites
Simon
1 minute ago, Jeremiah said:

Thank You I wasn't starting the builder first. I appreciate your patience.

no problem :)

Share this post


Link to post
Share on other sites

  • Similar Content

    • Kedark
      By Kedark+
      Hello. I have a big problem, platform 5, the save changes button does not work. All the time, "spins" and can not save modifications. There was information about the account refresh or re-login (due to the token), everything has been done, still saving does not work properly. Help.
      I got an answer on facebook that you have to put the site from scratch, I have a dozen or so - it's some tragedy. So ask for help !!!
      Regards, Kedark
    • oseehys
      By oseehys+
      Hello,
      My Site is showing the dreaded white screen of death i have disabled all plugins, disable theme yet it has not come backup...
      The default wordpress 2015 displays when i activate it, anytime i activate platform 5 it continues to show a white screen 
      I have increased the memory limit, added PHP ini, all the suggested advice i have followed...can someone tell me what to do ASAP 
      Regards


    • jordangross
      By jordangross+
      Here's what I see when I try to download Platform 5:

       
      Is Platform 5 still being supported?  Most of the comments in this forum look a year old or older.
    • fabienfons
      By fabienfons+
       
      Hi,
        Big problem on your website, impossible to download platform 5…   Any idea to solve the issue ? Fabien
    • MrFent
      By MrFent+
      I wanted to share something I'm dealing with on my PageLines 5 website. The website is culturedfoodlife.com. I've seen this issue a few times, but it's always fixed itself without me really doing much, so I don't know how to troubleshoot. It'll start out with my page loading all wonky, due to scripts and stylesheets missing. I look at the page source, and towards the top, I see this line:
      <link rel='dns-prefetch' href='//www.group-ib.ru' />
      I have no idea what that website is, or why it's loading that line of code, and then further down, I see it again as the domain that tries to load all of my pagelines section style scripts:
      <link rel='stylesheet' id='pl-pins-css' href='https://www.group-ib.ru/…/plugins/pl-section-pins/style.css…' type='text/css' media='screen' />
      <script type='text/javascript' src='https://www.group-ib.ru/…/pl-sect…/script.infinitescroll.js…'></script>
      <script type='text/javascript' src='https://www.group-ib.ru/…/plugi…/pl-section-pins/isotope.js…'></script>
      <script type='text/javascript' src='https://www.group-ib.ru/wp-conte…/…/pl-section-pins/pins.js…'></script>
      Here's a screenshot: https://www.screencast.com/t/Nqk9YglUf
      So I get that this is why it's not displaying correctly on the front end, because these style scripts don't exist on group-ib.ru, and I have no idea why it's inserting group-ib.ru instead of my domain culturedfoodlife.com.It makes me think I'm being hacked. This seems to be affecting the styles and scripts of pagelines sections. Other plugins on my site load their scripts with the correct domain name.
       
      When I've seen this in the page, it usually fixes itself after a few minutes, but in this last case, it didn't fix itself until I started disabling plugins. I was trying to see if I could go through each plugin one by one to see if I could fine out anything. I disabled everything but all my pagelines plugins/sections, and the issue went away. Then when I re-enabled everything, the issue was still gone. So now I'm clueless as how to keep testing this. Any suggestions?
      The fact that disabling every plugin EXCEPT the pagelines plugins kind of make me think that the issue isn't with pagelines, but then again when the issue occurs, why does it only affect pagelines sections? Andrew Powers I could use some insight. Thanks.
×