User tests: Successful: Unsuccessful:
The featured view is containing several errors, which this fixes.
Codereview.
Please select:
Documentation link for guide.joomla.org:
No documentation changes for guide.joomla.org needed
Pull Request link for manual.joomla.org:
No documentation changes for manual.joomla.org needed
| Status | New | ⇒ | Pending |
| Category | ⇒ | Front End com_contact |
| Labels |
Added:
PR-6.2-dev
Architecture
|
||
| Labels |
Added:
Updates Requested
|
||
Could you clarify: in your previous example of the new error handling method you placed $this->state = $model->getState(); and others in a try/catch block. Is that incorrect? Also, what are the errors that get fixed?
Could you clarify: in your previous example of the new error handling method you placed $this->state = $model->getState(); and others in a try/catch block. Is that incorrect? Also, what are the errors that get fixed?
The try-catch-block is only necessary if you want to catch the error and do some special handling. Catching the error and then throwing the error again as a generic exception is useless and you can just skip that try-catch then. The errors that I'm fixing here are among other things that there are no category, children or parent in this view. The corresponding calls have always just returned null and written to non-existing attributes. So to clean this up, I'm removing all of this, remove the unnecessary & when assigning the data to the class attributes and assign the data directly instead of taking an intermediate step. The current code is rooted in Mambo times and is more PHP4 than PHP8, so lets just get this cleaned up and save a few bytes. 😛
I have tested this item ✅ successfully on 521d7a0
I read the code, including the tmpl files and tried the patch - seems fine to me.
I have tested this item ✅ successfully on 521d7a0
I read the code, including the tmpl files and tried the patch - seems fine to me.
Reviewed:
remove use Joomla\CMS\MVC\View\GenericDataException;