Community Support

Widget background images  

  RSS
mjasinski
(@mjasinski)
Active Member

In the weather widgets for my Netatmo station I am using the four different time-dependant background images (day, night, sunset, sunrise). A few days ago the widget started to display the night background image only. I checked this with different browsers and also cleared the cache to exclude caching problems. My best guess is that this has something to do with my update to WordPress 5.2. I had to replace the night-time background with a day-time background to “fix” this issue.

Here is a sample page: https://jasinski.info/allgemeines/

Chrome DevTools are showing that my night image is used ( ), even though it's almost noon here now:

.lws-widget-outer-outdoor-5cdbcb97ef4c5 {
background-imageurl( );
border-radius4px;
...
}

 

Quote
Posted : 15/05/2019 10:33 am
Topic Tags
Pierre Lannoy
(@pierre-lannoy)
Member Admin

Hello @mjasinski!

This post is the following of the initial question on wp.org....

That's really a strange behavior. And a strange issue.

Could you confirm the time of your server and your WordPress installation is correct? Do you have errors in the Weather Station events log?

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 : 15/05/2019 2:32 pm
mjasinski
(@mjasinski)
Active Member

Hi,

thanks for looking into this issue! The server time is correct and WordPress is set to the "Berlin" time zone, which is also correct. PHP version is 7.2.17. So far I collected 7 errors, I attach them in a screenshot.

 

ReplyQuote
Posted : 15/05/2019 2:43 pm
Pierre Lannoy
(@pierre-lannoy)
Member Admin

OK.

Do you have somewhere a message (event, notification, etc.) regarding "Internationalization support"?

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 : 15/05/2019 3:03 pm
mjasinski
(@mjasinski)
Active Member

No, I didn't find such a message.

ReplyQuote
Posted : 15/05/2019 3:50 pm
Pierre Lannoy
(@pierre-lannoy)
Member Admin

Hello!

I've spent many hours to try to reproduce this issue, and I'm not able to do it 🤔 

May I ask you to try something:

  • could you verify with the ephemeris widget if all sun/moon times are correct?
  • could you add to your current (outdoor) widget the date/time?

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/05/2019 12:16 pm
mjasinski
(@mjasinski)
Active Member

Hi, many thanks for your efforts!

I added the ephemeris widget to https://jasinski.info/allgemeines/ and the sun/moon times are correct. Even more interesting is that the background image is also correct (tag.jpg). So both widgets show different backgrounds (nacht.jpg and tag.jpg), although their url settings are identical (reminder: nacht.jpg is currently a copy of tag.jpg for optical reasons). 

I didn't find an option to add date/time to the outdoor widget.

ReplyQuote
Posted : 16/05/2019 2:39 pm
Pierre Lannoy
(@pierre-lannoy)
Member Admin

Ok. That's an important info, because they have both the same source for night/day detection.

Could you confirm you're sure of (and verify) urls you've set in the widget (sorry to ask)...

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/05/2019 2:56 pm
mjasinski
(@mjasinski)
Active Member

Yes, of course, I wouldn't believe it either. Attached is a screenshot of both widget configurations.

ReplyQuote
Posted : 16/05/2019 3:05 pm
Pierre Lannoy
(@pierre-lannoy)
Member Admin

Have you (could you) try to put a second Outdoor Widget in your page? As I don't understand the problem, it could be corrupted parameters for the widget...

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/05/2019 4:11 pm
mjasinski
(@mjasinski)
Active Member

I placed a second outdoor widget with the same background URL settings on the same page. Unfortunately the night image URL (nacht.jpg) is used as the background.

ReplyQuote
Posted : 16/05/2019 4:27 pm
Pierre Lannoy
(@pierre-lannoy)
Member Admin

Hello !

Found something which can be the reason. It's the way Weather Station manipulates sunset / sunrise times. It may produce a slightly different value regarding the version of PHP (yes, I know, it's strange). Could you tell me what's your PHP version?

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/05/2019 5:37 pm
mjasinski
(@mjasinski)
Active Member

Hi,

sure, it is 7.2.17. 

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

Great. It must be that! I will release tomorrow a new version with a fix (rather an adaptation than a fix, by the way), will you be able to keep me informed of what happen?

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/05/2019 6:11 pm
mjasinski
(@mjasinski)
Active Member

Sure, sounds great! However, the plugin has worked with this PHP version before. Until about the time I updated to WordPress 5.2. I also don't think that the times are just shifted. According to my observations only the night picture is shown the whole day.

ReplyQuote
Posted : 17/05/2019 8:29 am

  
Working

To participate, please connect first!