Hi There,
I am using the RSS import snippet in MODx Evolution. It works very well indeed - provided my site is online and connected to the internet. If it is protected by a firewall or the site providing the RSS feed can otherwise not connect, I get the following error:
[quote]« MODx Parse Error »
MODx encountered the following error while attempting to parse the requested resource:
« PHP Parse Error »
PHP error debug
Error: fsockopen() [function.fsockopen]: unable to connect to www.bom.gov.au:80 (Connection refused)
Error type/ Nr.: Warning - 2
File: /Applications/MAMP/htdocs/ses/manager/media/rss/extlib/Snoopy.class.inc
Line: 1142
Line 1142 source: ))
Parser timing
MySQL: 0.0120 s (13 Requests)
PHP: 0.0970 s
Total: 0.1090 s [/quote]
I am not bothered by the message - I get it, it can't connect. What I am bothered by is that this message is then all that is visible on my site - and as it is on the home page, that is a big issue.
I have done google searches looking for a better way to handle this error but could not find any advice - most people just wanted it to stop having the problem. I don't mind that sometimes it can't connect - I just want to display a message in place of the feed saying RSS feed unavailable or something like that rather than have the first page of my site just disappear until it can connect again.
Does anyone know if it is possible to add something to the snippet or Snoopy.class.inc that will allow my site to handle this message more elegantly?
Thank you very much,
Kathy
[ed. note: kathyc last edited this post 11 years, 2 months ago.]