Homescreen may fail to load after deleting a report
simonr44 opened this issue · comments
Issue
The reports dashlet allows you to add reports to your homescreen.
If you delete a report which is used in a reports dashlet, the home screen fails to load and throws a 500 error.
Expected Behavior
The dashboard should continue to load, even after deleting a report which is used by the reports dashlet.
Actual Behavior
Uncaught Error: Attempt to assign property "user_parameters" on bool in /var/www/modules/AOR_Reports/Dashlets/AORReportsDashlet/AORReportsDashlet.php:44
Possible Fix
To follow
Steps to Reproduce
- Create a test report
- Add a reports dashlet to your dashboard
- Assign the test report to your new reports dashlet
- Confirm the home screen loads
- Delete the report
- Confirm the home screen fails to load, with the error shown above in the logs
Context
When this happens, the main workarounds are to clear user preferences or restore the deleted report.
This fix prevents the unrecoverable error and allows the user to interact with the dashlet as normal.
Your Environment
- SuiteCRM Version used: 7.14.3
- Browser name and version (e.g. Chrome Version 51.0.2704.63 (64-bit)): Chrome
- Environment name and version (e.g. MySQL, PHP 7): PHP8.2, MariaDB
- Operating System and version (e.g Ubuntu 16.04): Debian
Apologies I didn't spot the duplicate. Not sure if you have a preference on how to resolve the issue as we have taken different approaches here.