Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #10410 - Check report has been loaded before setting user params #10411

Open
wants to merge 1 commit into
base: hotfix
Choose a base branch
from

Conversation

simonr44
Copy link
Contributor

Description

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.

Uncaught Error: Attempt to assign property "user_parameters" on bool in /var/www/modules/AOR_Reports/Dashlets/AORReportsDashlet/AORReportsDashlet.php:44

Motivation and 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.

How To Test This

  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

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Final checklist

  • My code follows the code style of this project found here.
  • My change requires a change to the documentation.
  • I have read the How to Contribute guidelines.

@simonr44 simonr44 linked an issue Apr 22, 2024 that may be closed by this pull request
@serhiisamko091184 serhiisamko091184 added Status: Requires Code Review Needs the core team to code review Status:Assessed PRs that have been tested and confirmed to resolve an issue by a core team member Branch:Hotfix PR 4-8 Score given to PRs once assessed labels Apr 23, 2024
@serhiisamko091184
Copy link
Contributor

serhiisamko091184 commented Apr 23, 2024

Hey @simonr44,

thanks for your contribution!

Regards,
Serhii

@jack7anderson7 jack7anderson7 added Status: Requires Testing Requires Manual Testing Status: Passed Code Review Mark issue has passed code review reviewed and removed Status: Requires Code Review Needs the core team to code review labels May 1, 2024
@johnM2401 johnM2401 added Status: Passed Testing and removed Status: Requires Testing Requires Manual Testing labels May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Branch:Hotfix PR 4-8 Score given to PRs once assessed Status:Assessed PRs that have been tested and confirmed to resolve an issue by a core team member Status: Passed Code Review Mark issue has passed code review reviewed Status: Passed Testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Homescreen may fail to load after deleting a report
4 participants