• TU

    (@theupcomingcouk)


    Hello! I have a magazine based on wordpress and I had serious issues with a Javascript.
    I will do my best to describe what happened, it is literally driving me crazy because I fail to see what could have caused it.

    I have loaded WordPress on my VPS server and it worked fine until let’s say March. Then I started to have problems with the slider. The slider, which had a java code, started to block the whole homepage because it was failing to load and this prevented the rest of the webpage to load as well.

    Then I switched the option from slider to still image. It was loading. Then after a while – and nothing changed in the website code!!! – it stopped loading again.
    So Slider working -> Blocked the homepage out of the blue -> Disabled sliding option -> Homepage working fine -> Blocked the homepage out of the blue

    This was coming up as an error on my console:

    TypeError: ‘undefined’ is not a function (evaluating ‘jQuery(“#featured-content”).loopedSlider({
    autoStart: 3000,
    slidespeed: 500,
    containerClick: false,
    autoHeight: false
    })’)

    I tried many fixes, noting worked. So I cancelled it and installed a new different slider! Everything was smooth. The new one is a more sophisticated slider and you can choose between two scripts to load it, I can switch them with just a click: either SmoothGallery Mootools or jQuery. I preferred jQuery because it did not show a loading bar at the beginning.

    Four days ago after I rebooted the server I noticed it was not loading anymore! It was not loading the slider but the rest of the homepage yes (with the previous one it was blocking the whole page when the slider was blocked)! However, the bottom part with the sport articles was not loading (so let’s say slider not loading and 80% of the page loading)

    I usually use Firefox so I tried with Safari and my iPhone and it was working fine. I noticed it was because I was not logged in on wordpress. So I logged out on Firefox and it was working.

    Ok, not a big deal, readers are not logged in.

    The following morning I checked it again and it was blocked also for those not logged in! Nothing changed in the code though, nor I have rebooted. So the day before 100% loading for those not logged in, 80% for those logged in -> Afterwards 80% for everyone

    So I switched from the jQuery script to Mootools in the settings of our slider. It started to load the slider just fine, but not the bottom part of the page (still 80%).

    During the two following days – without anything changing – it got to load only 60% of the homepage content and now even 50%! And nothing is changing in the code

    So – as we speak – I tried to de-activate the plugin of the slider. Once I de-activate it the whole page loads fine on Safari, and on Firefox everything is good except the bottom right (95% good).

    The situation now is that if I choose jQuery the slider is not loading and also 50% of the homepage, if I choose Mootools it loads the slider but still only 50% of the homepage.

    Nothing changed in the code! What surprises me is that it is getting worse without anything changing. Any ideas?

    http://www.theupcoming.co.uk is the website

    I checked the error and access logs on apache: nothing related. I checked with Firefox and Safari’s error consoles: nothing at all.

    Any help would be greatly appreciated!

  • The topic ‘Javascript serious issue on the homepage’ is closed to new replies.