Hello,
After installing Drupal CMS ver 2, I got an error when trying to update page using Canvas page builder:
Error 500: Drupal\Core\Render\Element::isEmpty(): Argument #1 ($elements) must be of type array, null given, called in .../httpdocs/web/modules/contrib/canvas/src/Plugin/Canvas/ComponentSource/BlockComponent.php on line 245
I did small update in BlockComponent.php file:
//if (Element::isEmpty($build['content'])) {
// return $build;
//}
This change let me work with Canvas.
Also, it looks like "UI Icons for Menu" module makes canvas to crash too.
Please check.
Thanks
Oren
Comments
Comment #2
hyperlogos commentedI am also having exactly this error, and the same workaround works here., thank you Oren.
This was working for me from install until recently. Unfortunately I both recently did an update and also installed and removed the "radix" theme due to pretty much all of their dependencies carrying serious warnings, so I'm not sure what broke it. Radix depended on components module which I hoped might be the problem, but I uninstalled and removed components as well and the problem persists. So if it is the problem, it's some config change it made and not in the code.
Comment #3
wim leersThanks for reporting this!
Could you narrow down which block is hitting this problem? The code you commented out is necessary: just commenting it out is going to cause other problems. (Linking the issue that introduced that particular implementation).
How, exactly?
Comment #4
bdh676 commentedSteps to produce
An unexpected error has occurred while rendering the component's form.
Error 500: Drupal\Core\Render\Element::isEmpty(): Argument #1 ($elements) must be of type array, null given, called in /var/www/html/web/modules/contrib/canvas/src/Plugin/Canvas/ComponentSource/BlockComponent.php on line 245
Comment #5
hyperlogos commentedI uninstalled (but did not remove) Webform Access and uncommented that code again, and this has apparently solved the problem for me for now. Thanks bdh676.
Comment #6
bdh676 commented