WordPress.org

Ready to get started?Download WordPress

Forums

Simple Lightbox
[resolved] Doesn't work after update (30 posts)

  1. l7world.com
    Member
    Posted 1 year ago #

    worked fine until last update.
    no lightbox it just opens image file page (top 3 comic pages):
    http://l7world.com/2013/04/transgender-comic-book-characters-reveal-secret-identity.html

    http://wordpress.org/extend/plugins/simple-lightbox/

  2. Archetyped
    Member
    Plugin Author

    Posted 1 year ago #

    I looks like you might have a caching plugin on your site. I would clear the cache and possibly deactivate it to test to make sure that cached data is not causing issues with loading.

  3. WCat
    Member
    Posted 1 year ago #

    I have the same problem. I purged the cache and restarted nginx and php. still no go.

    using photon if that helps...

  4. londoneer
    Member
    Posted 1 year ago #

    Same - now broken...

  5. astrasuite
    Member
    Posted 1 year ago #

    Maybe it is related to the js being moved to the footer ? Mine not working too ...

  6. l7world.com
    Member
    Posted 1 year ago #

    Tried deactivating cache plugin but still broken.

    I also think it might have something to do with being in footer and possibly timing out.

    I know the previous version would do the same thing thing if you clicked before the page fully loaded.

  7. Archetyped
    Member
    Plugin Author

    Posted 1 year ago #

    If other users can provide a link to a page exhibiting the issue, I'd be glad to take a look. Until then, there's no way to confirm that the same issue is causing SLB not to work.

    @l7world: At least in your case, the problem is that SLB's libraries are not being loaded in the page at all. This may be related to the fact that jQuery (required by SLB) is not being loaded on the page either.

    It also appears that the cached/minified JavaScript is not being properly loaded on your site either. It's returning a 404 (file not found).

    If you can fully disable the caching plugin so that I can take a look at the site without caching involved, that may help us get to the root of the issue.

  8. l7world.com
    Member
    Posted 1 year ago #

    Cache plugin is off now.

  9. astrasuite
    Member
    Posted 1 year ago #

    I found out that mine has a problem when "Better WordPress Minify" is activated, this minifies the javascript. No problem in previous version of beta, so I guess moving it to the footer brought out the problem.

    I cannot deactivate BWP of course as it services other plugins for more efficient js handling.

    So trying to figure it out ...

    Maybe add an option to load in header or footer ? Thanks

  10. Archetyped
    Member
    Plugin Author

    Posted 1 year ago #

    @l7world.com: Thanks, SLB is now loading on your site.

    However, it appears that some other JavaScript files have been commented out from your theme (e.g. Cufon, jQuery UI, etc.), yet the code they are supposed to load is still being referenced.

    This causes an error which stops execution of other JS code such as SLB.

    Fixing those issues in your theme should allow SLB to work properly.

    Also, note that loading other lightboxes (e.g. prettyPhoto) may conflict with SLB's operation since they are both supposed display an image in a lightbox when clicked.

  11. Archetyped
    Member
    Plugin Author

    Posted 1 year ago #

    @astrasuite: So when BWP is deactivated, SLB loads properly?

    Minification aside, it doesn't appear that SLB's non-JS content is being loaded. This indicates a caching issue. Clearing the site's cache and temporarily deactivating the caching plugin should allow SLB's content to load properly.

    If you let me know when the caching plugin is deactivated, I'd be glad to take a closer look.

  12. astrasuite
    Member
    Posted 1 year ago #

    Yes, no problem at all when BWP is deactivated. Problem is probably something to do with minification, and others may be using some other plugin that minifies (?).

    I tested by deactivating all and reactivating one by one. Easy to do as I use "Plugin Organizer".

    BWP was fine with previous beta versions for testing.

    BWP has an option to load js in header, but one must know the registered name, and I cannot find any name called by a wp_enqueue_script to try.

    However, some other js from other plugins have no problem being loaded in footer, but they do have registered names.

  13. astrasuite
    Member
    Posted 1 year ago #

    Caching is no issue , perfect with W3 Total Cache, as long as BWP is deactivated. BWP also has a cache, and it has been cleared, and still same problem.

    Currently testing here :

    http://www.astrasuite.com/astrablog/living-voice-obx-rw-with-vox-olympian-in-munchen-high-end-show-2013/

    BWP currently deactivated. W3 Total Cache activated, and no problem. You can go see it. HTML is compressed though, of course, for efficiency. You can go to another page, go back again, and see w3 cache working well, as well as simple lightbox.

    If I reactivate BWP, it won't work again. like here where BWP is activated. I can do this selectively because of the fantastic Plugin Organizer.

    http://www.astrasuite.com/astrablog/the-new-voxativ-pi-loudspeakers/

  14. astrasuite
    Member
    Posted 1 year ago #

    So I compared both htmls of above, the one with BWP versus the one without.

    I don't know if this helps, I'm no programmer :

    Without BWP, it loads this, for example, with something appended at the end :
    simple-lightbox/client/js/lib.view.js?ver=2.0RC2.1

    With BWP, it loads this, without anything appended (although one can append something as an option):

    simple-lightbox/client/js/lib.view.js

  15. Archetyped
    Member
    Plugin Author

    Posted 1 year ago #

    @astrasuite: Thanks, SLB is now loading on both pages you provided.

    However, it appears that BWP rearranges the order of code execution on the page. The order of SLB's code execution is quite specific, which is why you're getting unexpected behavior when BWP is activated.

  16. astrasuite
    Member
    Posted 1 year ago #

    Yes, I noticed that too, rearranging, and it still doesn't work for me in the page with BWP :

    http://www.astrasuite.com/astrablog/the-new-voxativ-pi-loudspeakers/

  17. astrasuite
    Member
    Posted 1 year ago #

    By the way, @Archetyped, thanks for fixing the view on mobile phones like my Ipad 5, awesome ! And thanks for naming it to after my other handle zephyr88.

    Now, only problem is to get this BWP thing solved. One problem fixed, another one came, argh. BWP takes precedence however, as it covers other plugins too. Earlier Simple Lightbox is fine, so I'll probably revert to that first.

  18. astrasuite
    Member
    Posted 1 year ago #

    By the way, is there any script handle name for the SLB lightbox javascripts ?

    simple-lightbox/client/js/lib.core.js
    simple-lightbox/client/js/lib.view.js

    Then maybe I'll put them in the ignore list of BWP and see if it works ... I can only put in handle names, not script names ...

  19. Archetyped
    Member
    Plugin Author

    Posted 1 year ago #

    Currently the handles for each file are:

    slb_core - lib.core.js
    slb_view - lib.view.js

  20. astrasuite
    Member
    Posted 1 year ago #

    Perfecto !

    It doesn't work if I ask BWP to ignore it, but it works when I put it under "scripts to be minified in header". I can live with that, and I'll just ask BWP why.

    Thanks !

    In the meantime, I go back to previous version, as I like the wider area for moving next or previous, as well as the captions. Both reported in issues, under Github.

    And here is hoping the rest of the guys here get their problem fixed ...

  21. l7world.com
    Member
    Posted 1 year ago #

    Got it to work but also had to disable JS minify in cache.

    Also there's no longer a next or previous text link?

  22. invosoft
    Member
    Posted 1 year ago #

    It's also broken for me.

    It looks like the new AJAX stuff is incompatible with a CDN (also part of W3 Total Cache).

    Using S3, you get:

    XMLHttpRequest cannot load tag.item.js.gzip. Origin is not allowed by Access-Control-Allow-Origin.
    XMLHttpRequest cannot load tag.ui.js.gzip. Origin is not allowed by Access-Control-Allow-Origin.
    XMLHttpRequest cannot load handler.image.js.gzip. Origin is not allowed by Access-Control-Allow-Origin.

    See onlysoundingout.com for an example.

    Also, what's now being shown as the description under the image, looks like the filename?

    How do I change back to the old version?

    Thanks

  23. Archetyped
    Member
    Plugin Author

    Posted 1 year ago #

    Thanks for the feedback. However, I'm not getting the same error you've posted. Those files appear to be loading properly. Can you provide a bit more info on the OS/browser you're using?

    The lightbox displays the title for the image from your site's media library. By default, WordPress uses the file's name (without the extension) as the title when the image is uploaded if a custom title is not set. All titles can be edited from within the media library.

    All previous versions are always available on WordPress.org's Simple Lightbox page

  24. invosoft
    Member
    Posted 1 year ago #

    Yeah, I turned off caching completely as your new version just doesn't work with CDN support. I've turned it back on to show you. Can you have a look now please?

  25. Archetyped
    Member
    Plugin Author

    Posted 1 year ago #

    Thanks, I'm still not getting the AJAX error you're getting. Those files are loading properly when I load the page. What OS/browser are you seeing this error in?

    However, I can confirm that SLB is not currently working on your site. It appears that W3 Total Cache rewrites the image image links to the CDN after SLB processes them. I'll take a closer look at this and thanks for the feedback!

  26. invosoft
    Member
    Posted 1 year ago #

    I fixed the original error by setting up a Cross-Origin Resource Sharing (CORS) policy - see here. Now it's something else. Haven't really got the time to look into it but just to say, I'm finding starting to find the *simple* lightbox somewhat misnamed..

  27. Archetyped
    Member
    Plugin Author

    Posted 1 year ago #

    Ah, yes, that makes sense. SLB of course cannot (will not) support every 3rd party modification, so it's best to follow the recommendations provided by these service providers.

    I assure you SLB itself is quite simple, but when adding more complex modifications things like caching and CDNs to your site, things do tend to get a bit more complicated :)

  28. invosoft
    Member
    Posted 1 year ago #

    Do you think there is a way to manually get things to work?

  29. Archetyped
    Member
    Plugin Author

    Posted 1 year ago #

    Sorry if I wasn't clear in my previous posts.

    The AJAX error was a configuration issue related to the 3rd party CDN. This is something SLB has no control over and must be resolved using the method you already used.

    The link modifications by W3 Total Cache is something that will be investigated further though.

  30. invosoft
    Member
    Posted 1 year ago #

    Just to update you, I've downgraded to version 1.6 and it works fine with the CDN, and W3 Total Cache out of the box.

    It may help you make the improvements to version 2. Results can be seen here.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic