? Success

User tests: Successful: Unsuccessful:

avatar EmilMassey
EmilMassey
3 Mar 2016

PR to avoid displaying an error in mod_feed as issued in #9291.
The module should now render a message: Feed not found

Testing Instructions

  1. Add a Feed Display module
  2. Add any RSS Feed which has uncommon date formats
  3. See if the module throws error in Front-End.

Votes

# of Users Experiencing Issue
1/1
Average Importance Score
5.00

avatar EmilMassey EmilMassey - open - 3 Mar 2016
avatar EmilMassey EmilMassey - change - 3 Mar 2016
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 3 Mar 2016
Labels Added: ?
avatar 1apweb 1apweb - test_item - 3 Mar 2016 - Tested successfully
avatar 1apweb
1apweb - comment - 3 Mar 2016

I have tested this item :white_check_mark: successfully on 7d810d7

It's Ok, the module render a message: Feed not found with the patch.


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/9293.

avatar mbabker
mbabker - comment - 3 Mar 2016

This changes nothing. If the feed module is only catching RuntimeExceptions then it's better off catching all Exceptions instead. You're catching the thrown Exception and rethrowing a new Exception which makes debugging more difficult because now the error trace leads to that rethrown Exception versus the one that actually caused the error.

avatar joomla-cms-bot
joomla-cms-bot - comment - 3 Mar 2016

This PR has received new commits.

CC: @1apweb


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/9293.

avatar EmilMassey
EmilMassey - comment - 3 Mar 2016

Yeah, it was silly sollution... I guess catching all Exceptions in mod_feed helper is the best solution for now.

avatar mbabker
mbabker - comment - 3 Mar 2016

:+1:

avatar EmilMassey EmilMassey - change - 3 Mar 2016
Title
RSS Feed - throw RunTimeException when given date cannot be parsed (Solves #9291)
mod_feed - catch all Exceptions (Solves #9291)
avatar joomla-cms-bot
joomla-cms-bot - comment - 4 Mar 2016

This PR has received new commits.

CC: @1apweb


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/9293.

avatar grhcj grhcj - test_item - 4 Mar 2016 - Tested unsuccessfully
avatar grhcj
grhcj - comment - 4 Mar 2016

I have tested this item :red_circle: unsuccessfully on 0fd45bf

Tested on latest staging + this patch.
The fatal error described in #9291 appears with and without this patch applied (tested with the feed given in this issue).


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/9293.

avatar mbabker
mbabker - comment - 4 Mar 2016

If it's a fatal error that would be expected then as that isn't a thrown Exception that can be caught. Maybe if that error is a Throwable in PHP 7 it can be caught in the feed module but not much else that can be done for PHP 5 without validating the format before passing it into the JDate instance.

Semantically this patch is valid in the fact that it will catch all Exception objects thrown during processing of the feed.

avatar EmilMassey
EmilMassey - comment - 4 Mar 2016

According to http://php.net/manual/en/datetime.construct.php, since 5.3.0, if date/time format passed to the constructor is invalid, then Exception is thrown, so the patch should work as 5.3.10 is minimum for Joomla 3.x. I've tested this on PHP 5.5.9, and the Exception has been caught in the module. @grhcj can you provide PHP version you tested this on?

Date/time format validation may be implemented as proposed here: http://php.net/manual/en/function.checkdate.php#113205, but is it really necessary?

avatar brianteeman brianteeman - change - 7 Mar 2016
Category Modules
avatar grhcj
grhcj - comment - 9 Mar 2016

@EmilMassey My php version is 5.6.15.

avatar mbabker
mbabker - comment - 8 May 2016

This should be merged. Semantically it is a correct change. The fact that @grhcj still gets an error does not mean that this patch fails (it could be another location throwing the error, like the admin mod_feed module or the newsfeed component).

avatar grhcj grhcj - test_item - 8 May 2016 - Tested successfully
avatar grhcj
grhcj - comment - 8 May 2016

I have tested this item :white_check_mark: successfully on 0fd45bf

As @mbabker said - error might not be related to this PR - all fine with code review.


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/9293.

avatar EmilMassey EmilMassey - test_item - 17 May 2016 - Tested successfully
avatar EmilMassey
EmilMassey - comment - 17 May 2016

I have tested this item :white_check_mark: successfully on 0fd45bf


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/9293.

avatar mrcompl mrcompl - test_item - 17 May 2016 - Tested successfully
avatar mrcompl
mrcompl - comment - 17 May 2016

I have tested this item :white_check_mark: successfully on 0fd45bf


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/9293.

avatar zero-24 zero-24 - change - 17 May 2016
Status Pending Ready to Commit
avatar zero-24
zero-24 - comment - 17 May 2016

RTC based on multible tests


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/9293.

avatar joomla-cms-bot joomla-cms-bot - change - 17 May 2016
Labels Added: ?
avatar brianteeman brianteeman - change - 17 May 2016
Milestone Added:
avatar rdeutz rdeutz - close - 17 May 2016
avatar rdeutz rdeutz - merge - 17 May 2016
avatar joomla-cms-bot joomla-cms-bot - close - 17 May 2016
avatar rdeutz rdeutz - change - 17 May 2016
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2016-05-17 18:02:34
Closed_By rdeutz
avatar joomla-cms-bot joomla-cms-bot - change - 17 May 2016
Labels Removed: ?

Add a Comment

Login with GitHub to post a comment