After upgrading from 1.1 to 1.2 the images (sun, clouds etc.) show on the block disappered. The only thing that is left is src="" in html.

Comments

vvs’s picture

I'm too. Not with custom image or original.
Back to 1.1...

toddy’s picture

Hi,

do you have edited the weather template or are you using your own template for displaying the block? The image variable has changed, instead of $weather->image_filename there is now a complete <img> tag for inclusion in the template. So instead of

<div style="text-align:center;">
  <img src="<?php print $weather->image_filename; ?>" <?php print $weather->image_size; ?> alt="<?php print $weather->condition; ?>" title="<?php print $weather->condition; ?>" />
</div>

you would now use something like this:

<div style="text-align:center;">
  <?php print $weather->image; ?>
</div>

Regards,
Tobias

toddy’s picture

Status: Active » Postponed (maintainer needs more info)
Gessle’s picture

Status: Postponed (maintainer needs more info) » Closed (works as designed)

That seems to be the problem. I noticed this change, but I didn't remember that I had created my own template.

Thank you for the correction! :)

pdeclarens’s picture

Version: 7.x-1.2 » 7.x-1.3
Assigned: Unassigned » pdeclarens
Status: Closed (works as designed) » Needs review

Hello,

De: "bspite several attemps changing the location, I fail to get anything else than this:
location name, broken clouds, temperature... and no images
the bloc looks like this:

Current weather
Nantes: Broken clouds, 10 °C
Current weather
AK - Adak Island, Adak Airport: Overcast, 13 °C

I had a look at the tpl file and I do have at line 10 : print $weather->image;

I tried to add in the Directory ;;/site/all/modules/weather/images but it made no difference.

thanks for your help!

toddy’s picture

Status: Needs review » Closed (fixed)

This looks like you've enabled the "compact block" for weather. Could you check that, please? With that setting, the image (and other information like wind etc.) are suppressed. Simply disable that setting, and the images should appear.