Plugin

Archived
Forum
(read-only)

Yahoo Weather

ExpressionEngine 2, ExpressionEngine 3

Back to this add-on's main page
View Other Add-ons From 25hweb

     

PHP Errors

Bug Report

displayground
displayground

Hello,

We’re running into some php errors and our template tags are being printed to the page and not loading the weather information.

Details…

php errors in CP on plugin page.

A PHP Error was encountered
Severity
8192
Message
Non-static method Yahoo_weather::usage() should not be called staticallyassuming $this from incompatible context
Filename
yahoo_weather/pi.yahoo_weather.php
Line Number
21
A PHP Error was encountered
Severity
Warning
Message
Cannot modify header information headers already sent by (output started at /system/codeigniter/system/core/Exceptions.php:170)
Filenamecore/Common.php
Line Number
479 

Template tag

{exp:yahoo_weather location="USCO0085" language="en" unit="f"}  <class="wi wi-yahoo-{current_condition_code}"></i>
      <
span class="temp">{current_condition_temp_c}&deg;</span>{/exp:yahoo_weather} 

Running…
EE v2.10.3
Yahoo Weather 1.2.1
PHP 5.6.17

Would really appreciate some help getting this fixed. 

Thank you.

 

Daliz
# 1
Daliz

I have the same problem, seems like something is going wrong with the Yahoo Interface or so..

Click Rain
# 2
Click Rain

We are experiencing the same issue.

Filippo
# 3
Developer
Filippo

Hello,

Seems to be a Yahoo change in API.
I’ll try to find a quick solution but probable I need to change a lot of code.

Filippo

Filippo
# 4
Developer
Filippo

Please,
use error tag to handle yahoo error in right way.

Filippo

displayground
# 5
displayground

I’m sorry, I don’t understand what “use error tag to handle yahoo error in right way” means.

Can you give an example?

Filippo
# 6
Developer
Filippo

It’s quite simple.

{exp:yahoo_weather location=“UKXX0085” language=“en” unit=“c” tomorrow=“disable” }

{if ‘{error}’==‘FALSE’}
[your code and template]
{/if}

{if ‘{error}’==‘TRUE’}
  Forecasts aren’t available.
{/if}

{/exp:yahoo_weather}

In this way you can handle Yahoo Weather error and so avoid to break your html template.

Filippo
# 7
Developer
Filippo

Seems to be many changes on yahoo api, and many other users have problem.
Now yahoo api documentation and other yahoo services are not working correctly.

Anyway I’m working on an update of Yahoo Weather.

Filippo

Filippo
# 8
Developer
Filippo

Yahoo Weather v. 2.0.0. is released. Compatible with EE2 > 2.10.0 and EE v 3.1.0
Please open a new post o send an email to filippo [at] 25hweb dot com for any questione.

Filippo