Problem/Motivation
When rendering a Canvas page while the Varbase dashboards module is enabled, the following error appears on the page:
An unexpected error has occurred while fetching components.
Error 500: array_key_exists(): Argument #2 ($array) must be of type array, null given
file: /var/www/html/docroot/modules/contrib/varbase_dashboards/src/Plugin/Block/VarbaseContentOverview.phpAs a result, Canvas pages fail to render properly, producing a PHP warning and a 500 error.
Steps to reproduce
- Enable Varbase Dashboards & Canvas.
- Visit the main /canvas/**.
- Observe the PHP error in the components side or in the console.
Proposed resolution
Add a type check to ensure all variables are an array before calling array_key_exists().
Remaining tasks
- ✅ File an issue about this project
- ✅ Addition/Change/Update/Fix to this project
- ✅ Testing to ensure no regression
- ➖ Automated unit/functional testing coverage
- ➖ Developer Documentation support on feature change/addition
- ➖ User Guide Documentation support on feature change/addition
- ➖ UX/UI designer responsibilities
- ➖ Accessibility and Readability
- ✅ Code review from 1 Varbase core team member
- ✅ Full testing and approval
- ✅ Credit contributors
- ✅ Review with the product owner
- ✅ Update Release Notes and Update Helper on new feature change/addition
- ✅ Release varbase-10.1.0-beta1, varbase_dashboards-2.0.0-beta1
Varbase update type
- ✅ No Update
- ➖ Optional Update
- ➖ Forced Update
- ➖ Forced Update if Unchanged
User interface changes
- N/A
API changes
- N/A
Data model changes
- N/A
Release notes snippet
Issue fork varbase_dashboards-3550904
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
n.ghunaim commentedComment #4
rajab natshahComment #6
rajab natshahComment #7
rajab natshahComment #9
rajab natshah✅ Released varbase_dashboards-2.0.0-beta1
Comment #10
rajab natshahComment #11
rajab natshah✅ Released varbase-10.1.0-beta1