andreask7 / lwt

Learning with Texts (LWT) is a tool for Language Learning. The official version (not this one) is available at :
http://lwt.sf.net
Other
33 stars 7 forks source link

reading rss #2

Closed dif1754 closed 9 years ago

dif1754 commented 9 years ago

In file utilities.inc.php, code line 294 I changed the code from

'link' => trim(($feed_tags['item']=='entry')?($node->getElementsByTagName($feed_tags['link'])->item(0)->getAttribute('href')):($node->getElementsByTagName($feed_tags['link'])->item(0)->nodeValue)),

to:

'link' => trim(($feed_tags['item']=='entry')?($node->getElementsByTagName($feed_tags['link'])->item(0)->getAttribute('href')):($node->getElementsByTagName($feed_tags['enclosure'])->item(0)->getAttribute('url'))),

because I just realized that the code could NOT load all the rss items from my German podcast (especially the recent posts) named "Slow German" http://feeds.schlaflosinmuenchen.com/slowsim.xml

(for one second I could read some error messages on the screen when refreshing the feed...).

I tried to figure out why the code could not read the feed "properly" : actually there was no "link" tag in item, but another tag "enclosure url= ..."

I don't know if the specific feed is malformed or for some other reason... Anyhow, now I can read ALL feed items from the specific podcast (before just a few).

Just wanted to share.

andreask7 commented 9 years ago

Hello Cristian, I've fixed this issue in version 1.6.9. It's very likely your approach breaks other feeds that don't get the text directly from the feed but by following the links. Was the message you saw an error message (red) or an ordinary message (blue)? If you want to check if it works now you have to delete all articles of that feed in 'manage feeds' and reload the feed afterwards.

dif1754 commented 9 years ago

Hi, I installed the new version, removed the Slow German feed and re-subscribed it: now it works.

The previous error message I captured (it appeared just in one second or less...) was: screenshot - 20_12_2014 11_35_04

Thanks

andreask7 commented 9 years ago

There was a bug in my last update. It should now be fixed.