Since a few days, weather information in Plasma did not update. Selecting on "Running the associated application" in the context menu opens a web page with correct weather information, so I guess the parser needs to be updated to parse that page correctly again.
Same here, on both desktop and notebook. Also, a search does not return any entries from bbcukmet anymore (repeatable from several locations, so it's not a network issue on my end).
hmm, this does look broken, I hope BBC just changed URL vs parsing...
They have done some website redesigning, as mentioned in passing in http://www.bbc.co.uk/blogs/internet/posts/BBC-Weather-app-hits-5m-mark ("We are also using the lessons learnt on apps to start building a new responsive website for Weather"). It looks like they broke our bbcukmet ion in the process of the redesign. :-( This is the current documentation for the RSS feeds: http://www.bbc.com/weather/about/17543675 The search URLs changed, too, I cannot find any documentation for those. (Have they ever been documented?)
BTW, the credit of the ion claims "Supported by backstage.bbc.co.uk", but backstage.bbc.co.uk was discontinued in 2010! http://www.bbc.co.uk/blogs/bbcbackstage/2010/10/bbc-backstage-to-close.shtml
Created attachment 85589 [details] Update to BBC's new json-based search and modified xml
Created attachment 85590 [details] Handle cases where min. or max. temperatures are not reported With those two patches the ion should be working again. I've mainly tested the weather observations part, and only tested briefly the forecast. Both patches sent to the Shawn a few weeks ago, but adding them here to prevent them from getting lost.
Next time please submit the patches to Bugzilla, or (better) to ReviewBoard with a link in Bugzilla, rather than to one individual developer right away, so that everyone interested can find them.
(In particular, distro packagers who want to ship a package that actually works in their distribution.)
Thanks for the patch, I'm going to review it tomorrow (Sunday) please also submit to review board, but if it works I'll commit it.
Created attachment 85596 [details] Handle cases where min. or max. temperatures are not reported (4.11.7 backport) Here's a rebased version of the patch from comment #6 (the temperature one) that applies against kde-workspace 4.11.7. (Note: This patch does NOT have the git metadata attached. And please credit Raphael Geissert for the patch, not me, I only did a trivial rebase.) (The patch from comment #5 applies against 4.11.7 as is.)
There is now a condition "Clear Sky" that is not mapped to any icon, so I get the "not available" one.
Oh, this is a typo that has always been there: dayList["clar sky"] = ClearDay; should be "clear", not "clar"!
A Fedora user reported the following crash to us: http://pastebin.com/rBSnRxzf ion_bbcukmet.cpp:561 corresponds to this line in the source code: m_dateFormat = QDateTime::fromString(data.obsTime.split("-")[1].trimmed(), "hh:mm 'GMT'"); It looks like data.obsTime doesn't always contain '-'.
The user has the location configured to Szczecin, Poland (station ID: 3083829). Looking at the feed, I see only forecasts and no observation at all, which is why the observation time cannot be processed. The code needs to handle this robustly.
See also bug 332392.
Created attachment 85705 [details] Trivial fix for the "clear sky" typo Here's the trivial 1-character fix for the "clear sky" typo. I'm working on fixing the crash (bug #332392) now (since I'm apparently the only one who cares, grrr…).
Looks like the problem was not that the current conditions are not available at all, but that the observation time was missing or not in the expected format. Unfortunately, I cannot reproduce the crash right now.
In addition to the crash, the parsing code also has other issues: > data.obsTime = conditionString.midRef(0, splitIndex).toString(); pointless use of midRef, use mid or, better, left instead > // Saturday - 13:00 CET > // Saturday - 12:00 GMT > m_dateFormat = QDateTime::fromString(data.obsTime.split("-")[1].trimmed(), "hh:mm 'GMT'"); This hardcodes "GMT" in the format string, which does not match the local time zones actually used, such as "CET". Either you should just remove the time zone altogether (quick hack which does the right thing as long as you're considering the weather for your current location), or you should use a parser that supports time zones, such as: m_dateFormat = KDateTime::fromString(data.obsTime.split("-")[1].trimmed(), "%H:%M %Z").toLocalZone().dateTime();
Created attachment 85721 [details] Fix for crash bug #332392 and error handling improvements This patch improves several instances of string manipulation and error handling: * crash kde#332392 should be gone, we now verify that the string contains '-' before splitting on '-', I also simplified the string handling a bit * parsing the time correctly parses the timezone instead of hardcoding "GMT" * unavailable weather conditions are now reported as "N/A" (or the translated version thereof), not "null" * unavailable temperatures are now correctly treated as missing and no longer reported as "0°C" The patch compiles and runs fine for me, but since I cannot reproduce the crash, I cannot absolutely verify that it is gone.
Created attachment 85741 [details] Fix for crash bug #332392 and error handling improvements (v2) I've just noticed I had accidentally messed up the reporting of the current weather conditions so that it always reported "N/A" even when the condition is being reported just fine in the RSS. This fixed version of my latest patch fixes that. (It still requires the other 3 patches to be applied first.)
Git commit 84fe5785bd1520f17a801cfe2e263c8ba872b273 by Friedrich W. H. Kossebau, on behalf of Raphael Geissert. Committed on 02/04/2016 at 23:47. Pushed by kossebau into branch 'Plasma/5.6'. [weather bbcukmet] Update to BBC's new json-based search and modified xml M +51 -39 dataengines/weather/ions/bbcukmet/ion_bbcukmet.cpp http://commits.kde.org/plasma-workspace/84fe5785bd1520f17a801cfe2e263c8ba872b273