Forums

Shadowbox JS
[resolved] W3 Total Cache CDN & Shadowbox JS Dont Play Nice (10 posts)

  1. leckley
    Member
    Posted 1 year ago #

    Hi Guys,

    I have been playing around with Shadowbox JS and found that if I am using the W3 Total Cache CDN the shadowbox fails to launch for the viewing of the images.

    Is there a work around?

    http://wordpress.org/extend/plugins/shadowbox-js/

  2. Matt Martz
    Member
    Posted 1 year ago #

    Please provide a link to a place where we can see this issue.

  3. cmarxen
    Member
    Posted 1 year ago #

    Hi,

    I have the same problem.

    When activating the Total Cache plugin and running theme files and so on from Amazon Cloudfront, the Shadowbox plugin just stops working.

    You can go to secretsofman.com

    When you click for the free ebook I have it all activated to open in Shadowbox right now. But it just doesn't work. Then as soon as I deactivate Total Cache it works again.

    I really hope you can come up with a solution as I LOVE Shadowbox and have recommended to people. But since Total Cache is almost a must-have plugin now, they really should be working together.

    Thank for an otherwise amazing plugin
    Christian

  4. Matt Martz
    Member
    Posted 1 year ago #

    I do not use W3TC, but as far as I can tell, it looks like W3TC is assuming that since the cached shadowbox.js file is in the uploads dir that it should use the cdn hostname. Since it is not actually an upload, W3TC would have not uploaded it to your CDN.

    In short this is a W3TC issue as it is mistakenly assuming that anything in the uploads dir should use the cdn hostname. As far as plugins are concerned if you are going to create a cache file the uploads directory is the appropriate place to put it.

    You could possibly resolve this by manually uploading the wp-content/uploads/shadowbox-js directory to your CDN. Either that or instead of using a push style CDN such as cloudfront/S3, use a pull style CDN.

    A pull style CDN does not require you to upload files, the CDN will retrieve the file from the origin server and then cache it when the file is requested.

  5. cmarxen
    Member
    Posted 1 year ago #

    Thanks a lot Matt :)

    I just tried uploading the directory manually to the cdn and now it works!

    Now just need to find a fix to the bug in W3TC if possible, as there seem to be a few related problems. Anyway that's another plugin, so thanks a lot again.

  6. cmarxen
    Member
    Posted 1 year ago #

    Just want to add for others that it appears W3TC is functioning ok.

    I just needed to add the directory with its full path to the Custom Files to upload.

    Now it all runs perfectly.

  7. Matt Martz
    Member
    Posted 1 year ago #

    @cmarxen: I'm glad that you were able to resolve the issue.

  8. jonmrich
    Member
    Posted 1 year ago #

    I'm having the same problem and tried to create a directory in the CDN (cloudfront/s3), but it's not working. Any insight on how you got this working? Do I need to make any changes to the settings on the cache plugin CDN page (custom file list, etc.)?

    Thanks

  9. jonmrich
    Member
    Posted 1 year ago #

    Nevermind...got it.

    I actually uploaded the directory and files while in AWS. That didn't work. Instead, add the path "wp-content/uploads/shadowbox-js/*" to the Custom file list box on the CDN settings.

    Towards the top of the CDN settings page, check the box to host custom files and click the upload button.

    Clear all the cache and it should work.

  10. pbvlad
    Member
    Posted 1 year ago #

    I am glad I found this. I had been battling with getting it to work all day long, yet I couldn't figure it out. Surprisingly, I couldn't find the /shadowbox-js/ folder in the uploads directory, but it was rather in my root/images/ directory. I guess if you set the media folder manually in WP it affects the placement of the shadowbox-js dir too.

    Works now, thanks everyone!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic