Plugin version 0.9.4.1 only working in Safari

Forums Forums Slimbox2 plugin Plugin version 0.9.4.1 only working in Safari

Viewing 15 posts - 1 through 15 (of 30 total)
  • Author
    Posts
  • #587
    Anonymous
    Member

    I have made a very odd observation on the blog of a friend I am maintaining: Slimbox 2 (which is a stellar plugin, just to mention as much !) will work just fine in Safari, but refuse to display in Firefox or Internet Explorer. I’ve tried disabling the most likely culprits, but neither the status of the cache (WP Super Cache 0.9, set to half-on), of the Minify-ing of JS files (min/index.php?f=$1 redirects)  nor of the JS redirection to the footer (Footer JavaScript 0.3) make a difference: whatever the combination of these being enabled or disabled, Safari does consistently display Slimbox effects (once the script has loaded), and FF / IE do not.

    Also, autoloading or adding rel="slimbox" expressly does not change anything either. See http://rhetashan.name/2008/04/19/rideau/ for an example.

    Any idea what I am doing wrong?

    #5017
    malcalevak
    Moderator

    I haven’t diagnosed the problem, but for what it’s worth, in case someone else has an idea, I noticed that Firefox claims it can’t find the autoload script, I get a 404 error in firebug, yet it still displays a response and I can view the code. I’ll see if I can figure out what’s up.

    As for the rel="slimbox" bit, that’s because you’re supposed to use rel="lightbox" (though it should be relatively easy to adjust to support both, I think), but it won’t necessarily work with the autoload checked (something I’m planning to eventually fix).

    One last thing, had you previously run an earlier version of the plugin without any trouble?

    #5018
    Anonymous
    Member

    @ malcalevak, thanks for taking the time to investigate. I haven’t run any older version of Slimbox before. As the friend I’m doing this for is not quite up to hand crafting her link code, I had waited for the plugin to support auto activation without the rel="lightbox" (rel="slimbox" was a typo, I did use the correct syntax while testing <img decoding=” title=”Smiley” /> ). What makes me really scratch my head is the fact that disabling *all* WP plugins except for Slimbox2 did not change anything to the problem. I’d be immensely grateful for a pointer to what the problem is!

    #5019
    malcalevak
    Moderator

    I think the key to solving this problem is figuring out why the javascript is coming up with a 404 error (and yet still appearing to load).

    #5020
    malcalevak
    Moderator

    For the sake of a test (though I suspect it will continue to not work) download and try some of the older copies of the plugin from the wordpress page: http://wordpress.org/extend/plugins/wp- … /download/

    Let me know if any of those work.

    If they still fail, and you know how to do this, try to replace the slimbox2_autoload.js.php with a hardcopy of the code it contains, slimbox2_autoload.js, and manually load that.

    #5021
    Anonymous
    Member

    @malcavelak I tested versions 0.9.1, 0.9.2, 0.9.3 and 0.9.4: the 404 error on tyring to load slimbox2_autoload.js.php is persistent across all versions, and so is the failure of Slimbox to activate in FF. As to manually loading the code, I’m out of my depth there, sorry. I also went and replaced slimbox2.js by its version 2.0.2, to no avail.

    #5022
    malcalevak
    Moderator

    This definitely has me stumped, though I suspect the fault is related to some sort of server configuration.

    Ryan had once mentioned (and added a feature to circumvent) that dynamically generated css files occasionally had issues, so he added an inline option. I might see about doing something like that to test it on this site. That would at least point us in the right direction.

    #5023
    malcalevak
    Moderator

    And can you tell me what version of PHP the site is running on?

    I managed to test the code that’s being output by the js.php with the site (manually overriding the script), and it worked just fine, so I’m trying to figure out exactly what is at fault.

    #5024
    malcalevak
    Moderator
    #5025
    malcalevak
    Moderator

    In the meantime, if you want a quick fix (though plugin upgrades will break it) try this:
    Go to: http://rhetashan.name/wp-content/plugin … hp?ver=1.0 and File->Save Page As and cut off the end, just save it as slimbox2_autoload.js

    Next, upload this file to your slimbox2 directory. Once you’ve done that, edit index.php line 30 from:
    [code:2go2gzyr]
    wp_register_script(‘slimbox2_autoload’, WP_PLUGIN_URL.’/wp-slimbox2/slimbox2_autoload.js.php’,array(‘slimbox2’), ‘1.0’)
    [/code:2go2gzyr]
    to:
    [code:2go2gzyr]
    wp_register_script(‘slimbox2_autoload’, WP_PLUGIN_URL.’/wp-slimbox2/slimbox2_autoload.js’,array(‘slimbox2’), ‘1.0’)
    [/code:2go2gzyr]

    In theory that should at least have it working, but I’d still appreciate your help in diagnosing the issue to help prevent it in the future.

    #5026
    Anonymous
    Member

    The site is running PHP 5.2.8 on Linux / Apache, GD: bundled (2.0.34 compatible), Magic Quotes GPC: On, Memory Limit: 64.0 MiB.

    I’m stumped too. I even switched the site to the WP default theme, wondering if something was amuck with the theme framework (it’s using a Thamatic themelet), but no luck: FF and IE insist on ignoring Slimbox.

    #5027
    Anonymous
    Member

    Well, I have implemented your suggestion, with the following results:

    1. the 404 for the file is gone
    2. I had to disable on-the-fly minify, as JSMin.php chokes on slimbox2_autoload.js (the original js.php was not minified, as redirection is via mod_rewrite for .js and .css only) – not too surprising, considering the file’s syntax is php, not javascript. I also disabled Footer JavaScript to reduce possible interference,
    3. behaviour is now consistent across browsers inasmuch Safari does not display Slimbox effects anymore either. Now Safari, FF and IE all ignore Slimbox autoload.

    Does the fact that Safari ignores the js, but corretcly processes the js.php, while otehr browsers ignore both, help any in debugging this?

    #5028
    malcalevak
    Moderator

    Try setting Magic Quotes GPC: Off, it’s not wise to have it on, only bad code uses it, and in PHP 6 it’ll stop working anyway.

    If the site is still live with those changes you made, I’ll be taking a look at it shortly.

    #5029
    malcalevak
    Moderator

    I take it you switched the site back, since I’m still getting a call to the .js.php

    Also, what’s footer javascript do? (though as it’s disabled during testing I know it’s not at fault, just curious)

    #5030
    Anonymous
    Member

    Yes, I switched back, seeing it works at least in one browser that way (as opposed to none), and as I wanted to reenable on-the-fly minifying of JS and CSS files.

    Disabling Magic Quotes GPC – is that something I can achieve through CPanel? My friend has gone for an economy hosting plan, not a server I could get root access to, and  seeing she wants to host a  low traffic, low bandwidth, pretty special interest blog, I can hardly convince her to shell out the money for a VPS…

    The Footer JavaScript plugin moves all scripts correctly enqueued with WP to the document footer, as per Yahoo!’s recommendations. The effect is have the page render before scripts load, which makes the page appear faster and allows for earlier interaction (and yes, of course, I am aware scripts will ony work after full load…).

Viewing 15 posts - 1 through 15 (of 30 total)
  • You must be logged in to reply to this topic.