Jump to content
hibbsy78

Customisation Script Error

Recommended Posts

hibbsy78+    24
hibbsy78

Hi,

 

I'm trying to install a fundraising script onto my site but it is causing a few errors.

 

The script is:

 

<script src='http://assets.goalsforgiving.com/gfg-charity/js/badge.js'></script><script>new Badge({ type : 'widget-badge', side : 'widget-right', css_position : 'widget-fixed', charity : 'hibbslupustrust'});</script>

 

which is placed in the header script under CSS. You can see it works in putting the badge on the right of the screen.

 

There are a few errors showing in Pingdom http://postimage.org/image/63flm4uyv/ can anyone advise what the error is? The script/badge is working successfully on other none page lines sites.

 

Script program & working site - http://charities.goalsforgiving.com/hibbslupustrust

 

My site - http://www.hibbslupustrust.org

 

Thanks!

Share this post


Link to post
Share on other sites
hibbsy78+    24
hibbsy78

Hi Simon,

 

It still brings up the errors shown in Pingdom. It also affects the mobile load (the feature image isn't resized).

Share this post


Link to post
Share on other sites
Simon    247
Simon

can you remove that js? just to see whats going on?

Share this post


Link to post
Share on other sites
hibbsy78+    24
hibbsy78
can you remove that js? just to see whats going on?
Sorry Simon when you say remove the js which part do you mean?

Share this post


Link to post
Share on other sites
hibbsy78+    24
hibbsy78

Done.

Share this post


Link to post
Share on other sites
Simon    247
Simon

Well it isnt doing it now, all i can think of is your script has an issue with one of the other scripts on the page, and you have a lot of javascript going in.

 

prototype, scriptaculas, jquery, nextgen, lightbox, browsercheck just to name a few!! So you need to start disabling stuff to find out the conflict.

 

I tried out the code on my test setup and it worked perfectly, so we can assume its something 3rd party causing it.

Share this post


Link to post
Share on other sites
hibbsy78+    24
hibbsy78

By deactivating lightbox it successfully clears the errors showing in pingdom. The only issue not is that it stops the features from changing and also resizing in mobile view.

Share this post


Link to post
Share on other sites
Simon    247
Simon

Figured it out... the js file is NOT compatible with jquery in wordpress, which is why it includes its own at runtime, and this in turn breaks every other script that uses jquery lol.

 

This version (attached) of the file works, so save it to your site and adjust the original script snippet to load it instead of the remote one.

badge.js.zip

Share this post


Link to post
Share on other sites
Simon    247
Simon

Those errors are caused by something else, disable the lightbox again

Share this post


Link to post
Share on other sites
hibbsy78+    24
hibbsy78

Disabling Lightbox removes those errors. Is there any alternate to light box? It really helps when viewing items in the store rather than opening the image in a new page!

Share this post


Link to post
Share on other sites
Simon    247
Simon

If you think this is resolved click the button ;)

Share this post


Link to post
Share on other sites
hibbsy78+    24
hibbsy78

Thanks Simon. Really appreciate your support!!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×