• Resolved bhageria

    (@bhageria)


    Hello

    Let me first thank you for this plugin. It is great. Thank you!!

    I am creating this topic because I need help with a small issue. Almost everyday I get the following error

    analytics.js hasn’t been updated for more than two days. is your cron running?

    I have read some other people were also having the same issue but I am not able to resolve it

    1) I have Autoptimize and WP Super Cache installed
    2) CAOS cache folder is excluded from Autoptimize
    3) Other plugins with cron jobs do not show this error
    4) Update *.js button in the settings page of CAOS fixes it but after sometime, the problem repeats.
    5) Hosting on GoDaddy

    It would be great if you could help me resolve it.

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter bhageria

    (@bhageria)

    I tried something

    1) I deleted the WP Super cache’s cache. No issues. The cron was still running

    2) I deleted Autoptimize cache and the cron stopped. I stared getting the same message – “analytics.js hasn’t been updated for more than two days. is your cron running?”

    3) I updated it and made sure it is running and repeated the same steps multiple times.

    Same result always. So everytime the Autoptimize cache is cleared, the CAOS cron starts having an issue.

    I thought that maybe, just maybe, autoptimize is deleting everything from the /cache folder, the default location for Save analytics.js to… *
    So I changed the location in CAOS settings from /cache/caos-analytics/ to /cache-caos/caos-analytics/, and repeated the same steps again. And it worked. I tried it multiple times and all seems fine. I guess autoptimize is clearing the js file from CAOS’s cache folder and hence the error. I am not sure if it will be auto corrected at the next scheduled cron run.

    All seems to be working now. Please give me some time so that I can check that the workaround is indeed running for a long time.

    Thanks!!

    Plugin Author DaanvandenBergh

    (@daanvandenbergh)

    This is a known issue, @bhageria but props to you for figuring it out by yourself!

    Actually it isn’t Autoptimize, but WP Super Cache triggering the emptying of the entire cache-folder. More info: https://www.ads-software.com/plugins/host-analyticsjs-local/#i%20use%20wp%20super%20cache%20%2F%20w3%20total%20cache%20%2F%20autoptimize%20or%20another%20caching%20and%2For%20minification%20plugin.%20why%20is%20it%20removing%20analytics.js%20when%20i%20flush%20my%20cache%3F

    I guess autoptimize is clearing the js file from CAOS’s cache folder and hence the error. I am not sure if it will be auto corrected at the next scheduled cron run.

    almost; when AO’s cache is cleared from wp-content/cache/autoptimize AO asks page caches to do so as well (to avoid cached pages having references to deleted CSS/ JS). based on your observations it seems that WPSC in that case simply clears the entire wp-content/cache folder causing the analytics file to disappear as well ..

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘analytics.js hasn’t been updated for more than two days. is your cron running?’ is closed to new replies.