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

    • gstrahle
      By gstrahle+
      Hi,
      Is there anything that can possible be done to improve the loading performance of PageLines Platform and Elements?
      https://goldenstategreens.com/wp-content/plugins/pl-platform/engine/ui/js/common.js?ver=946207(180.5KiB) https://maps.gstatic.com/maps-api-v3/embed/js/36/11/init_embed.js(146.6KiB) https://maps.googleapis.com/maps/api/js?client=google-maps-embed&paint_origin=&libraries=geometry,search&v=3.exp&language=en_US®ion=us(99.3KiB) https://goldenstategreens.com/wp-includes/js/jquery/jquery.js?ver=1.12.4(87.0KiB) https://goldenstategreens.com/wp-content/plugins/pl-section-slider/flickity.js?ver=946207(48.2KiB) https://goldenstategreens.com/wp-content/plugins/pl-section-impulse/owl.js?ver=946207(35.3KiB) https://goldenstategreens.com/wp-content/plugins/pl-platform/engine/ui/js/site.js?ver=946207(18.8KiB) https://goldenstategreens.com/(17.5KiB of inline JavaScript) https://secure.gravatar.com/js/gprofiles.js?ver=2019Apraa(15.9KiB) https://goldenstategreens.com/wp-includes/js/jquery/ui/effect.min.js?ver=1.11.4(11.6KiB) https://goldenstategreens.com/wp-includes/js/jquery/ui/tabs.min.js?ver=1.11.4(9.6KiB) https://s0.wp.com/wp-content/js/devicepx-jetpack.js?ver=201917(9.4KiB) https://goldenstategreens.com/wp-content/plugins/pl-section-lax/parallax.min.js?ver=946207(7.8KiB) https://goldenstategreens.com/wp-includes/js/jquery/jquery-migrate.min.js?ver=1.4.1(7.7KiB) https://goldenstategreens.com/wp-includes/js/jquery/ui/accordion.min.js?ver=1.11.4(6.4KiB) https://goldenstategreens.com/wp-includes/js/jquery/ui/widget.min.js?ver=1.11.4(6.1KiB) https://goldenstategreens.com/wp-content/plugins/pl-section-meganav/superfish.js?ver=946207(4.4KiB) https://goldenstategreens.com/wp-includes/js/jquery/ui/core.min.js?ver=1.11.4(3.3KiB) https://goldenstategreens.com/wp-content/plugins/pl-section-meganav/meganav.js?ver=946207(2.2KiB) https://goldenstategreens.com/wp-content/plugins/pl-section-meganav/sticky.js?ver=946207(2.2KiB) https://goldenstategreens.com/wp-content/plugins/pl-section-impulse/impulse.js?ver=946207(1.7KiB) https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d3355.356766011451!2d-117.21045368481853!3d32.75626678097826!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x80deaaeffa185a7f:0x6613dd77eb86c21!2sGolden+State+Greens!5e0!3m2!1sen!2sus!4v1552542527201(1.5KiB of inline JavaScript) https://goldenstategreens.com/wp-includes/js/wp-embed.min.js?ver=5.1.1(1.2KiB) https://goldenstategreens.com/wp-content/plugins/google-analyticator/external-tracking.min.js?ver=6.5.4(975B) https://goldenstategreens.com/wp-content/plugins/jetpack/modules/wpgroho.js?ver=5.1.1(716B) https://goldenstategreens.com/wp-content/plugins/jetpack/_inc/build/widgets/milestone/milestone.min.js?ver=20160520(488B) https://goldenstategreens.com/wp-content/plugins/pl-section-flicky-posts/js/script.js?ver=946207(469B) https://goldenstategreens.com/wp-content/plugins/jetpack/_inc/build/photon/photon.min.js?ver=20130122(395B) https://goldenstategreens.com/wp-content/plugins/pl-section-lax/lax.js?ver=946207(352B) https://goldenstategreens.com/wp-content/plugins/pl-section-slider/slider.js?ver=946207(319B)  
      We are working on site loading performance and would like to get a passing grade, and our load time down to 3 seconds.  We will be making updates to the content size to bring it down as well. Please let me know if there is anything that can be done to address the loading issues found here within PageLines Plugins.
      https://gtmetrix.com/reports/goldenstategreens.com/5rnupbNu
       
      Thanks
    • fabienfons
      By fabienfons+
      Hi,
      Impossible to download platform 5 from your website (security alert)
      Impossible to download platform from wordpress (no results when I search Pagelines in the wordpress extension platform...)
      What is happening ?
      Pgelines is dead ?
      No news on your blog since 2016... I am a bit worried..
      Fabien
    • 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.
×