WordPress.org

Ready to get started?Download WordPress

Forums

Promotion Slider
[resolved] Auto Advance Not Working (jQuery) (5 posts)

  1. suntower
    Member
    Posted 1 year ago #

    Hi Micah,

    I have a client with PromoSlider on the home page and the auto advance is not working. Their theme loads its own jQuery (1.51) and I thought that's the issue as I see a JS error in Firebug @ line 171.. it attempts to call replace() method. The links work fine.
    http://raima.com

    HOWEVER, they showed me a staging site which (they claim) is identical... same theme code and Promoslider version and WP core. And the PromoSlider advances properly.
    http://test2.raima.com

    Before I go nuts debugging... any ideas as to why the first does not work and the staging site -does- work? I'd like to just throw it back as a theme issue but since the 2nd site does work, I don't want to give in just yet.

    TIA,

    ---JC

    http://wordpress.org/extend/plugins/promotion-slider/

  2. Micah Wood
    Member
    Plugin Author

    Posted 1 year ago #

    @suntower,

    Yes, having a theme or plugin load its own version of jQuery is a very bad practice. However, the issue here is this:

    Failed to load resource: the server responded with a status of 403 (Forbidden) http://www.raima.com/wp-content/plugins/promotion-slider/js/promo_slider.js?ver=3.5.1

    The staging site doesn't return a 403 for the promotion slider javascript file, whereas the production site does. It sounds like a server misconfiguration to me. Whatever the case, fixing the 403 status code so that you get a 200 status code when going to that URL will fix the problem.

  3. suntower
    Member
    Posted 1 year ago #

    Hi Micah,

    I am SOOOOOO SORRY. I gave you the wrong domain for the one that does -not- work. The client created a subdomain just for 'me' to look at this which -does- load the promotion-slider.js and yet it -still- does not work. I can see the settimeout advancing in Firebug, but it hits line 171 and then throws an error at the console

    Working: http://test2.raima.com

    NOT working: http://jcharris.raima.com

    TypeError: c.replace is not a function
    http://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js?ver=1.5.1
    Line 16

    ...but as I said, on the test2.raima.com site, it's configured (supposedly) the same and it -does- work---in spite of the old jQuery 1.51.

    Can you please look at it again. I know it's annoying. I truly apologise. I'll even donate again! :)

  4. Micah Wood
    Member
    Plugin Author

    Posted 1 year ago #

    @suntower,

    Sorry, it looks like you beat me to the solution. I took a look at the site that is not supposed to be working and it is working. If you have found the solution, do you mind posting what the issue was?

  5. suntower
    Member
    Posted 1 year ago #

    Yes. I must be getting blind... impatient... or ADHD in my old age. If you were to look at the two sites, you'd see that one calls a file 'promoslider.js' and the one that doesn't work is 'promotion_slider.js'. Both were run through the Admin update service and registered as version 3.51 and the first few lines of both are the same. But at a certain point inside they contain -very- different js. So the older file promoslider.js works within this theme (themeforest websplash) and the larger file (promotion_slider.js) does -not-... I guess because it contains that .replace() method.

    I contacted the theme author and he sent me an 'update' in which he simply included a minified jQuery 1.8... rather than re-writing to call jQuery from the WP core (which I thought was best practice.) So I am recommending that my client move away from this theme.

    Thanks. Sorry to give you a wild goose chase. I appreciate your following up... one of the reasons I recommend this plug to clients.

    Best,

    ---JC

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic