Community Support

[This post is marked as unsolved] Widget and WP-Rocket  

  RSS
MarcelC
(@marcelc)
Eminent Member

Hi Pierre,

I tried to find the answer in the forum but couldn't find it, sorry for maybe asking stupid questions:

We use the "Outdoor Weather Summary"-widget on all our posts sidebar but it isn't "refreshed". We do use the WP-Rocket caching plugin. Is there a way to make only the Widget not cached? Do you use a specific javascript that I can exclude from being cached?

 

Kind regards,

 

Marcel

Quote
Posted : 19/02/2019 12:57 pm
Pierre Lannoy
(@pierre-lannoy)
Member Admin

Hello Marcel.

It's the first time I hear there's a refresh issue with WP-Rocket, but that's not totally a surprise regarding how these cache plugins have aggressive caching mechanisms.

But, before I blame WP-Rocket, let's first see if everything is working properly on Weather Station:

  • Is your WP cron operational? At which frequency?
  • What type of station are you collecting?

Thanks.

 

If you like Weather Station, please consider to make a review to help make it known. That would be the best way to thank me...

ReplyQuote
Posted : 19/02/2019 5:48 pm
MarcelC
(@marcelc)
Eminent Member

Hi Pierre,

Good to see you're so fast in response, really great!

1. We have an external WP-CRON every minute, it's working great as other plugins also need it.

2. Very simple (yet) only OpenWeatherMap in 1 station.

Here some settings of WP-Rocket:

  1. cache tab: Mobile cache: both options on. User cache: off. Cache lifespan: reduced today to 3 hours (was 10).
  2. file optimization tab: all on except 'optimize CSS delivery' and 'combine javascript files'.
  3. media tab: all on except 'disable Wordpress embeds'
  4. preloading tab: only preloading on (not the sitemap)
  5. advanced tab: nothing special or relevant
  6. CDN tab: nothing

So I assume from your answer that also with WP Rocket a widget should always load "realtime" data?

 

Kind regards,

 

Marcel.

 

ReplyQuote
Posted : 19/02/2019 6:31 pm
Pierre Lannoy
(@pierre-lannoy)
Member Admin

Hello Marcel.

Thanks for this detailed report. It seems all is rightly done from your side. So, maybe it is a new way for WP-Rocket to do things, because I have started to have, for the last few weeks only, a convergence of problems regarding non-refresh due to the cache. And because I take it as a serious alert, here is what I will do:

  • Trying to reproduce (thanks for your detailed report 😉 ) the issue on my test servers.
  • If it's reproducible, I will try to find the cause and a workaround.
  • If steps 1 and 2 are ok, I will publish a fix in version 3.8 (this spring if all go well).

I'll let you know as soon as I have news on this.

PS: just out of curiosity, are you using a cache because your site has a a lot of traffic, or to compensate an undersized server?

If you like Weather Station, please consider to make a review to help make it known. That would be the best way to thank me...

ReplyQuote
Posted : 19/02/2019 11:22 pm
Pierre Lannoy
(@pierre-lannoy)
Member Admin

Oh, and just another question. What's your hosting provider?

If you like Weather Station, please consider to make a review to help make it known. That would be the best way to thank me...

ReplyQuote
Posted : 19/02/2019 11:29 pm
MarcelC
(@marcelc)
Eminent Member

Good morning Pierre,

Our website ( https://tvvalkenburg.tv , we're a small local public TV station with only volunteers) is huge (15K+ posts) and gets many visitors (2-5K p day) and because of SEO it's good to have it fast (GTMetrix from Londen is now 2.1sec). The server is a VPS (2GB/2core/SSD) hosted at DigitalOcean (AMS), with Apache and NGINX.

Besides WP-Rocket we use REDIS, perhaps that's the victim?

In our (iOS and Android) apps I also have 1 web view to a (hidden) page with more detailed 'clean gauges', this page is explicitly not cached and works as expected.

Kind regards,

Marcel.

This post was modified 5 months ago by MarcelC
ReplyQuote
Posted : 20/02/2019 8:10 am
Pierre Lannoy
(@pierre-lannoy)
Member Admin

Hello Marcel!

I confirm I found a bug in the way Weather Station generates widgets when WP-Rocket is activated (and maybe some other cache managers). I've found a workaround (making the widget self-loaded via Ajax). The fix will be included in version 3.8.

Thanks for the report.

PS: I moved this post from "General Questions" to "Bug & Issues".

If you like Weather Station, please consider to make a review to help make it known. That would be the best way to thank me...

ReplyQuote
Posted : 22/02/2019 2:52 pm
MarcelC
(@marcelc)
Eminent Member

Hi Pierre,

this is really good news! You're a very concerned developer, I give you my compliments!

Looking forward for the 3.8 version.

Thank you very much.

Marcel. 

ReplyQuote
Posted : 25/02/2019 8:28 am
Pierre Lannoy
(@pierre-lannoy)
Member Admin

Hello Marcel!

Version 3.8.0 is released and it should fix your issue... Could you confirm it, after activating the right option in settings / system?

Thanks.

If you like Weather Station, please consider to make a review to help make it known. That would be the best way to thank me...

ReplyQuote
Posted : 16/04/2019 2:32 am
MarcelC
(@marcelc)
Eminent Member

Hi Pierre,

I found out that the complete widget is gone, and somehow I can't get it back. The config is same/correct however it's not showing. I saw someone else on this forum also has this issue.

Kind regards,

 

Marcel.

ReplyQuote
Posted : 17/04/2019 9:47 am
Pierre Lannoy
(@pierre-lannoy)
Member Admin

Hello!

The first time you use it, you must purge all your cache... Have you tried it?

If you like Weather Station, please consider to make a review to help make it known. That would be the best way to thank me...

ReplyQuote
Posted : 17/04/2019 12:30 pm
Pierre Lannoy
(@pierre-lannoy)
Member Admin

Hello Marcel.

I've carefully reviewed the way your site is functioning and there's something which blocks some javascripts. To verify my assumptions, could you uncheck "Wait for DOM" in settings/system then purge the cache, then verify the page where the widget must be loaded?

Thanks for your help!

If you like Weather Station, please consider to make a review to help make it known. That would be the best way to thank me...

ReplyQuote
Posted : 17/04/2019 2:57 pm
MarcelC
(@marcelc)
Eminent Member

WoW, again a quick response! Thanks for that!

 I unchecked the option, cleared caches but still the same. I also tried to switch of “scripts in footer” but also no result. 

Kind regards,

Marcel

ReplyQuote
Posted : 17/04/2019 5:31 pm
Pierre Lannoy
(@pierre-lannoy)
Member Admin

OK. So now, I found it's not a bug related to WP Rocket cache. Try this uncached url :

https://tvvalkenburg.tv/?nocache

As you see, the issue is here. In fact there's something else (theme, plugin?) which blocks javascript in widget (it's how Weather Station workaround the initial cache issue). Do you know if you use something special to block javascript in widgets?

Are you using something to lazyload, defer or async javascripts too?

This post was modified 3 months ago by Pierre Lannoy

If you like Weather Station, please consider to make a review to help make it known. That would be the best way to thank me...

ReplyQuote
Posted : 17/04/2019 8:02 pm
Pierre Lannoy
(@pierre-lannoy)
Member Admin

Marcel, there is another user who have the same issue as you. Just curious, are you using a template from Saurabh Sharma?

This post was modified 3 months ago by Pierre Lannoy

If you like Weather Station, please consider to make a review to help make it known. That would be the best way to thank me...

ReplyQuote
Posted : 18/04/2019 12:17 am

  
Working

To participate, please connect first!