Jump to content

Archived

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

outtareach

Javascript got page not loading

Recommended Posts

outtareach

I put some java snippet in a text box and now the page isnt loading but I cannot get in to remove the code.  Any suggestions here?

Share this post


Link to post
Share on other sites
outtareach

I need to remove a textbox but cannot load the editor to remove it, is there any other option otherwise I cannot work on the site.

Share this post


Link to post
Share on other sites
greenfly

What is the code you have added to the site? What does the code do? 


The answer to many issues can be found by searching in the forum before posting as someone else  may very well have had the same problem before you have.  Also, reading the documentation can help you gain a good understanding of how everything works. 

 

Please do not send me private messages. Occam's razor - The principle states "Keep things simple!"

Share this post


Link to post
Share on other sites
outtareach

a stock ticker now the page just loads and I cant get to editor to change the code or remove it,  I need to manually somehow take it out to get the page loading or else I guess I have to stat over

Share this post


Link to post
Share on other sites
outtareach

for some reason I put this code in a text box and it went nuts on me.  should have put in a widget  but I just wasnt thinking

   <!-- START Worden Top Gainers and Losers Ticker Widget -->
<script src="http://widgets.freestockcharts.com/js/jquery-1.3.1.min.js" type="text/javascript"></script> <script src="http://widgets.freestockcharts.com/script/WBIHorizontalTicker2.js?ver=12334" type="text/javascript"></script> <link href="http://widgets.freestockcharts.com/WidgetServer/WBITickerblue.css" rel="stylesheet" type="text/css" />
<script>
    var gainerTicker = new WBIHorizontalTicker('gainers');
    var lossTicker = new WBIHorizontalTicker('losers');
    gainerTicker.animate = false;
    gainerTicker.animationHost = lossTicker;
    gainerTicker.start();
    lossTicker.alsoMove = gainerTicker;
    lossTicker.start();
</script> <!-- End Scrolling Ticker Widget -->

Share this post


Link to post
Share on other sites
outtareach

can you just tell me where the live code lives so I can manually remove the textbox from the page somehow?

Share this post


Link to post
Share on other sites
James B

Hi there, I spoke to the Dev team on this and Simon wrote a hook to make DMS ignore the textbox code so you can get back in and delete it.

 

Paste the following code into your functions.php of the base theme or customise plugin - http://paste.pagelines.com/kPSUU9ih

 

Make sure you replace the page id and the clone id with the info you're targeting. Save, then refresh a couple of times to get it to take affect. 

 

Then you'll be able to go back into the editor, remove the script and save, then go back into the functions.php and remove the hook.


Kindly search the forum and read the documentation before posting. It will help you resolve many issues.

For CSS help be sure to check out W3Schools first and be sure to download FireBug for FireFox for troubleshooting.

James B

Share this post


Link to post
Share on other sites
outtareach

thanks a bunch but where would I find the clone Id?  so I put this code into the functions file and change the data to match mine?

Share this post


Link to post
Share on other sites
James B

Yeah, paste that code in to match the clone id and page id on your site. You can find these using the browser inspector tools, firebug or chrome dev tools etc. The page id will be near the top of the html inspector panel, the clone id will be within the section html.

 

http://screencast.com/t/OiJksGzift


Kindly search the forum and read the documentation before posting. It will help you resolve many issues.

For CSS help be sure to check out W3Schools first and be sure to download FireBug for FireFox for troubleshooting.

James B

Share this post


Link to post
Share on other sites
outtareach

thanks James, I did what you said and put the below code in functions.php of my dms install and still not loading.

add_action( 'template_redirect', 'fix_mah_shit' );
function fix_mah_shit() {
	
	// these settings are CRUCIAL
	$postid = 476; // post/pageid
	$clone = 'u0bx1v'; // cloneid, use page inspector....
	$setting = 'textbox_content'; // what we nuking?
	//
	
	$data = get_post_meta( $postid );
	$data = maybe_unserialize( $data['pl-settings'][0] );
	$data['draft'][$clone][$setting] = '';	
	update_post_meta( 3859, 'pl-settings', $data );
}

Share this post


Link to post
Share on other sites
Simon

 

thanks James, I did what you said and put the below code in functions.php of my dms install and still not loading.

add_action( 'template_redirect', 'fix_mah_shit' );
function fix_mah_shit() {
	
	// these settings are CRUCIAL
	$postid = 476; // post/pageid
	$clone = 'u0bx1v'; // cloneid, use page inspector....
	$setting = 'textbox_content'; // what we nuking?
	//
	
	$data = get_post_meta( $postid );
	$data = maybe_unserialize( $data['pl-settings'][0] );
	$data['draft'][$clone][$setting] = '';	
	update_post_meta( 3859, 'pl-settings', $data );
}

You have to be logged in, and it ONLY updates the settings in the editor not the live site, and you have to refresh TWICE for it to work.

Share this post


Link to post
Share on other sites
outtareach

I log in, go to functions php for dms and drop in the code.  refresh and try to go to the site and use editor and it still spins.  do I change    "update_post_meta( 3859, 'pl-settings', $data );" to match my page id also?  either way I still just get the loading page.

Share this post


Link to post
Share on other sites
Simon

oh, yea 

 

oversight by me.. unless your pageid is the same ;)

Share this post


Link to post
Share on other sites
outtareach

thanks for the help but I changed and still it makes no difference with my editor.  I am putting this in functions.php

add_action( 'template_redirect', 'fix_mah_shit' );
function fix_mah_shit() {
	
	// these settings are CRUCIAL
	$postid = 476; // post/pageid
	$clone = 'u0bx1v'; // cloneid, use page inspector....
	$setting = 'textbox_content'; // what we nuking?
	//
	
	$data = get_post_meta( $postid );
	$data = maybe_unserialize( $data['pl-settings'][0] );
	$data['draft'][$clone][$setting] = '';	
	update_post_meta(476, 'pl-settings', $data );
}

Share this post


Link to post
Share on other sites
outtareach

is there just a way to go into where it is generated and remove the text box code manually?

Share this post


Link to post
Share on other sites
Danny

Hi

 

Where abouts have you placed the code, in the DMS functions.php file ? If so, that is incorrect, all custom functions such as hooks need to be placed inside a child themes functions.php file.

Add the code to your child theme or customize plugins functions.php file and it then should work.


Please search our forums, before posting!

Share this post


Link to post
Share on other sites
outtareach

I've tried both ways multiple times and nothing works.  I put the code in the pagelines customize plugin functions.php file and have reloaded my page 10 times and still just loading editor symbol. any other options would be appreciated.

Share this post


Link to post
Share on other sites
Simon

PM me an admin login

Share this post


Link to post
Share on other sites
Simon

Fixed. The code snippet is different as its a global scope setting.

 

https://gist.github.com/Pross/7436898

Share this post


Link to post
Share on other sites
outtareach

appreciate it greatly, do I need to make any other changes to such as removing the custom code?

Share this post


Link to post
Share on other sites
Simon

I removed any code i added.

Share this post


Link to post
Share on other sites
outtareach

thanks again but what way would you recommend implemented the javascript that gave me trouble? 

Share this post


Link to post
Share on other sites
Danny

I would recommend contacting the creating of the code, as the code itself is using an out of date jquery. Also, Wordpress already uses Jquery so there shouldn't be any need to include it in your script.


Please search our forums, before posting!

Share this post


Link to post
Share on other sites

  • Similar Content

    • jagipson
      By jagipson+
      @Andrew @Simon
       
      I was wondering on your old documentation for DMS you supply the code for a Nested Column:
      <div class="row"> <div class="span4">4</div> <div class="span8">8 <div class="row-fluid"> <div class="span6 zmb">6</div> <div class="span6 zmb">6</div> </div> </div> </div> You don't explain how to do this in Platform 5 Besides <div class="row"> </div>
      Whats the appropriate code for a nested section in Platform 5.
    • Michael Kummer
      By Michael Kummer+
      Hi guys!
      I am using a plugin called Speed Booster Pack to speed up the load time of michaelkummer.com. One of the plugin settings, Minimize HTML and JavaScript causes an error that I only get with Pagelines. With other themes, such as WordPress' Twenty Seventeen, I do not get that error.
      I have reproduced the problem on my staging site and if you look at the JavaScript console, you will see the following error:
      SyntaxError: Unexpected end of script
      Any clue what PageLines may be doing differently to be contributing to this issue? I contacted the plugin developer and they, of course, pointed me to the theme developer
      Thanks
      Michael
    • flourishdesignstudio
      By flourishdesignstudio+
      Hello,
      We are working on a site and the customers are complaining that the site loads too slowly. They contacted their host who mentioned that the Java Script is all loading at the beginning. Is it possible to delay the load of the less important Java Script until after the initial load to speed up the site? The goal is to load the page faster by minimizing the initial javascript calls.
      Are there any preferred plugins that you would recommend or does this end up causing excessive problems with plugins, etc.?
      Thanks for the help!
    • chamois_blanc
      By chamois_blanc+
      I am trying to clone a container on a page. It throws the following javascript error:
      function l(b, c, e, f) { var g = m.a.f.get(b, p); if (!c) { if (g) throw Error("You cannot apply bindings multiple times to the same element."); m.a.f.set(b, p, !0) } I would appreciate guidance and a fix. Thank you
    • Jeremiah
      By 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.
       
×