• I have been trying to debug my website for weeks now and I can’t find the problem. I have narrowed it down to w3 total cache but even then, it’s got me perplexed.

    On this page: http://www.oleymediagroup.com.au/portfolio/logo-design/ a portfolio should load using the Portfolio Media Grid which comes with The7 theme: http://the7.dream-demo.com/portfolio/portfolio-grid/1-portfolio-grid/

    If I deactivate the plugin-W3 Total Cache – It loads fine – this is how I confirmed it was W3 Total Cache.

    So, I turned it back on and then under “Minify” – I checked “Disable minify for logged in users” – When I went to the front end, it worked fine (when logged in)…

    So, after this, I DISABLED minify on the general settings page (thinking the above step had proven it was “minify”).

    Now, here’s the kicker – If I am logged into WP and I visit the portfolio page, the portfolio loads (due to “Disable minify for logged in users”) BUT, if I log out (even with minify DISABLED) and access the portfolio page, the portfolio WILL NOT LOAD???

    – Yes, I have emptied all caches about 20+ times…

    The only other settings I have enabled in W3 Total Cache are:
    – Page cache
    – Browser Cache

    I am at a loss to explain it and I am at the point where I am about to throw our W3 Total Cache because it wont work with my theme… What else could it be??

    https://wordpress.org/plugins/w3-total-cache/

Viewing 7 replies - 1 through 7 (of 7 total)
  • Hi. Just had a look it seems like it is indeed a cache issue (despite your clearing caches) because when i visited the page the portfolio didnt load but when i used a query string for the url the portfolio did load fine — that’s definitely a cache thing.

    Using firebug i also noticed this peculiar thing:

    When your portfolio works (when i used a non-cached version of the page using a query string) this js file looks like this:

    http://www.oleymediagroup.com.au/wp-content/plugins/js_composer/assets/lib/bower/imagesloaded/imagesloaded.pkgd.min.js?ver=4.3.1

    But when it doesnt work (when i first visited the site) this is what i see:

    http://www.oleymediagroup.com.au/wp-content/plugins/js_composer/assets/lib/imagesloaded/imagesloaded.pkgd.min.js?ver=4.3.1

    The difference is the missing “bower” directory as shown in the first link. Not sure how that is happening but its possible the minify (in automatic mode) is mistakenly getting the directory incorrectly and so you could set it to manual mode, use the wizard to populate the files and then if this particular file is missing the “bower” part you can fix it there. And this could possibly solve your minify problem.

    But for now, it appears the reason why you are not seeing the portfolio work while the minify is disabled (and not logged in) is because (possibly) it is due to server-side caching (not related to your emptying cache 20+ times). The browser cache setting i believe is picked up by the server when outgoing objects are sent and keeps track of this. This could explain why i was served the old page despite visiting your site for the first time ever, but got a newer page when i used a query string.

    Thread Starter SJW

    (@whitsey)

    Thanks for that thorough review but… that just adds even more confusion…

    Because:
    1. I did and always have had minify set to manual mode – on first install I tried automatic but it broke everything so I then went about manually adding files one by one.

    2. I removed imagesloaded.pkgd.min.js from the minified file list about 2 weeks ago when I started debugging this problem.

    Therefore, I can’t add bower because the file isn’t in the minify list … (not that anything is being minified anyway because it’s switched off!)

    Thread Starter SJW

    (@whitsey)

    I can see it is now loading /bower/ and it is working.

    not sure what or how this has happened but it appears to be working… (unless it’s just me locally)

    NOPE… Just checked using web-sniffer.net and it is not loading /bower/

    I forgot to mention that cloudflare is also in the mix… and I am trying to prove it to be a problem with cloudflare (which I think you may have identified BUT when I removed clouflare from the equation, I had the issues above)

    I just want to prove that going direct works fine and it’s just cloudflare that breaks it but I can’t seem to get any accurate, reliable results…

    I find it fascinating that your portfolio page still refuses to show the non-cached version and i have to use a query string to reveal the real page (which shows the working js animating logos). Hmmm….when you deactivate w3tc (via “Installed Plugins” in wordpress) does the portfolio page finally show the portfolio animations?

    I want to figure out if it is cloudflare or w3tc who is serving this old cached page because right now i can get two versions of the same page and so someone is serving a cache file.

    If it isn’t cloudflare i’s as if w3tc’s “/wp-content/cache/page_enhanced/” directory isn’t empty (even though u mentioned it was cleared 20x). If u have ftp (or file manager) access can u jump in and make sure this directory is truly empty? Very interesting mystery here.

    Cheers
    Kimberly

    Thread Starter SJW

    (@whitsey)

    Hi, yes – deactivating w3tc appears to resolve the problem.

    To remove cloudflare from the equation, I just added the original server IP to my hosts file and bypassed cloudflare entirely.

    Interesting – I went and checked that directory and emptied all the caches 3-4 times yet nothing happened – the directory is full of files.

    I have now deleted this directory manually but it has re-populated instantly ( I assume due to the cache primer)

    Very interesting. Hey when u say u deleted the directory manually and they re-populated immediately, did the file times changed too? I just want to make sure we are indeed dealing with regenerated files and not an illusion (files appearing as deleted but was merely a file manager display trick)

    Yea it does appear that the primer is what is being triggered, and apparently doing so very quickly (how many seconds is it set to?). I assume the files only get regenerated when the w3tc plugin is activated or did this also happen when it was deactivated?

    Thanks again for the info.

    Thread Starter SJW

    (@whitsey)

    You could be on to something here.

    The files and folders regenerate immediately with the same timestamp October 6th 2015! I am going to try deleting them as root to see if it’s a permissions issue…

    Yep, the files and folders were all set to owner “root” which obviously means that W3TC wouldn’t have had permission to overwrite them!

    I reckon October 6th was when i did a restore… must’ve copied these files as root and ruined everything!

    At least I have a clean slate to start my testing again now!

    Can you tell me if you can see the portfolio from your PC? I can’t tell if it’s fixed or if it’s just my cache:

    Does this page load a portfolio: http://www.oleymediagroup.com.au/portfolio/business-card-design/

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘W3 is breaking the portfolio on my site’ is closed to new replies.