[4.0][com_contact] - fix unpublished contact#30642
[4.0][com_contact] - fix unpublished contact#30642wilsonge merged 1 commit intojoomla:4.0-devfrom alikon:patch-81
Conversation
|
I have tested this item ✅ successfully on bb6a0ea This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/30642. |
1 similar comment
|
I have tested this item ✅ successfully on bb6a0ea This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/30642. |
|
RTC This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/30642. |
| if ($e->getCode() == 404) | ||
| { | ||
| // Need to go through the error handler to allow Redirect to work. | ||
| throw new \Exception($e->getMessage(), 404); |
There was a problem hiding this comment.
Can we re-throw the original exception rather than creating a fresh one. At worse we should nest the existing exception as the third param
There was a problem hiding this comment.
@wilsonge
That code is the same as in ArticleModel.php. Should the eventual modification be done for both in another PR in order to get that in already for beta4?
There was a problem hiding this comment.
Sure I'm happy. But we definitely should at minimum nest the exceptions
There was a problem hiding this comment.
Ideally yes. Else if that doesn't work for some reason - worse case change this line to
throw new \Exception($e->getMessage(), 404, $e);
There was a problem hiding this comment.
ah ok .... throw $e; works
i'll do a patch with that for both ArticleModel and ContactModel
|
Thanks! |
Pull Request for Issue #30637 .
Summary of Changes
fix
Testing Instructions
see #30637
Actual result BEFORE applying this Pull Request
multiple errors
Expected result AFTER applying this Pull Request
404