PDA

View Full Version : Problem with feeds YUI script



DJDB
08-25-2017, 07:58 AM
Hello, i'm using the YUI script on http://djdb.me and i noticed today that the feed contents randomly appear and disappear after every refresh of the page. Didn't have any issue until today, i'm using the latest version. Any idea what's happening? Thanks.

jscheuer1
08-25-2017, 01:44 PM
You originally added the above question to a thread about:

http://www.dynamicdrive.com/dynamicindex18/gajaxrssdisplayer.htm

However, I don't see that script anywhere in use on the page you linked to. I do see the Yahoo YUI script in use though, and it appears it's being used for feeds in a way outlined in the Yahoo YUI documentation without the need for the gAjax RSS Feeds Displayer v2.2 script mentioned above.

Any problems you are having with it would likely be a result of the implementation you are using though. So I'm at a bit of a loss, except to say that it could just be a connectivity issue, possibly the result of the methods used in that implementation, or perhaps independent of them. Any feed reading script can experience intermittent connectivity issues. However, I reloaded the page you linked to several times and wasn't able to duplicate the problem you mention. When I updated the script here that uses YUI, I did read a lot of their documentation and thought that the method they were using (which also appears to be the one you are using, or possibly you are using Tumbler code for the feeds, it's not clear to me) was perhaps subject to some issues in cases where resources might not load in the order desired, but it really was too complicated to be certain, and since I was using a different method, I didn't see any sense looking too deeply into theirs.

If you changed nothing, perhaps it's just a temporary network lag. If so, it should be fine again as soon as conditions improve.

jscheuer1
08-29-2017, 01:24 AM
Since my last post in this thread it has come to my attention that Yahoo is no longer actively developing YUI, and that other applications using it for feeds have recently been experiencing problems like you described. That may or may not be a part of the problem here. Either way though, since they are still maintaining it, my original advice may still be valid - that is that it could be a temporary networking issue. Ive been doing some tests, and the response seems to be improving. In another few days, it may be back to normal. Also, as I said, when I repeatedly tested your page, it seemed to be working fine.

Fedoke
09-07-2017, 06:48 AM
I also had soms troubles after refreshing or loading the solution. The DIV part where the text should be inserted simply wasn't created.
It seems to go better since the last 24 hours. Even with a "stress test" (10x refresh in 10 seconds and then once every hour), the news feed is still coming up.
I don't know what happened or what the solution is, but I haven't changed anything in the code.
Maybe there is a link with the URL I used: the rss feed I use is from Google News.
https://news.google.com/news?cf=all&hl=nl&pz=1&ned=nl_be&output=rss

jscheuer1
09-07-2017, 02:55 PM
I've come up with three variations all of which solve the problem. The basic solution is to retry the request if it comes back empty, that and to use the script tag method of making the request. This second part isn't necessary, but seems easiest to me for use with the retry idea. See also these threads for more info, and the solutions I just mentioned:

http://www.dynamicdrive.com/forums/showthread.php?81325-YUI-YQL-performance-spotty-sometimes-total-failure


http://www.dynamicdrive.com/forums/showthread.php?81320-RSS-feeds-using-YQL-stopped-working