User tests: Successful: Unsuccessful:
Pull Request for Issue #11106 .
#11106
This issue is closed, but the problem still exists in 3.6.2: it happened yesterday, http://feeds.joomla.org/JoomlaSecurityNews was not responding fast enough.
Uncatch error in feed factory
Error String could not be parsed as XML : this problem happens randomly
Create an incomplete feed and call it in a newsfeed module
Status | New | ⇒ | Pending |
Category | ⇒ | Libraries |
Labels |
Added:
?
|
Status | Pending | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2016-10-09 09:58:20 |
Closed_By | ⇒ | pmleconte |
Status | Closed | ⇒ | New |
Closed_Date | 2016-10-09 09:58:20 | ⇒ | |
Closed_By | pmleconte | ⇒ |
Did you mean to close this?
oops we posted at the same time
No, just messed up (I clicked on Close and comment ?????)
What's being gained here by catching and throwing a new exception? All you're basically doing is changing the error message, but it's also changing stack trace for the exception and to debug it one is going to have to be aware that it has a nested exception and dig into that. If there were some sort of additional layer of error handling it wouldn't be as big of an issue but catching and throwing a new exception honestly isn't a great practice.
I tried catching this error in different places with no success. If you find a better place or way of doing it, please let me know, because, when it happens, this error blows up my web sites.
Well if it's the feed module (either site or admin) that's making the request the only way it wouldn't catch it is if you're on PHP 7 and it's throwing something derived from the new Error
object. If it's coming from the newsfeed component that isn't catching the base Exception
class but only InvalidArgumentException
and RuntimeException
. Since creating a new SimpleXMLElement
throws Exception
if it has invalid XML I'd say change what the component's catching and see what happens.
If it really is the modules not catching the error, in the error.php template add a get_class($this->error)
line and share that class name please.
OK, found it: I was using scrollfeed display module (http://appsnity.com/notification/joomla/23-scroll-feed-display.html) based on a old version of mod_feed (3.5.1). It's not catching all errors.
So, forget about this PR...
Pascal
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2016-10-09 18:12:06 |
Closed_By | ⇒ | pmleconte |
Copy the following file as test.rss and call it in a rss feed module
It should cause error 0 - String could not be parsed as XML
Pascal