salesagility / SuiteCRM

SuiteCRM - Open source CRM for the world
https://www.suitecrm.com
GNU Affero General Public License v3.0
4.27k stars 2.03k forks source link

Homescreen may fail to load after deleting a report #10410

Closed simonr44 closed 1 month ago

simonr44 commented 2 months ago

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

  1. Create a test report
  2. Add a reports dashlet to your dashboard
  3. Assign the test report to your new reports dashlet
  4. Confirm the home screen loads
  5. Delete the report
  6. 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

serhiisamko091184 commented 2 months ago

Hello @simonr44,

thanks for raising the issue.

This appears to be a duplicate of: https://github.com/salesagility/SuiteCRM/issues/10353 Please let us know if you believe otherwise.

Regards, Serhii

simonr44 commented 2 months ago

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.