- Issue created by @mayur-sose
500 error when using Test Block Components: $client_model must be of type array, null given.
While testing with the Test Block Components module enabled, I encountered a server error and the UI fails to load as expected.
Please see the attached video for a demonstration of the error.
Console error:
{
"status": 500,
"data": {
"message": "Drupal\\experience_builder\\Plugin\\ExperienceBuilder\\ComponentSource\\BlockComponent::clientModelToInput(): Argument #3 ($client_model) must be of type array, null given, called in /var/www/html/web/modules/contrib/experience_builder/src/Form/ComponentInputsForm.php on line 102",
"file": "/var/www/html/web/modules/contrib/experience_builder/src/Plugin/ExperienceBuilder/ComponentSource/BlockComponent.php",
"line": 403,
"trace": [
{
"file": "/var/www/html/web/modules/contrib/experience_builder/src/Form/ComponentInputsForm.php",
"line": 102,
"function": "clientModelToInput",
"class": "Drupal\\experience_builder\\Plugin\\ExperienceBuilder\\ComponentSource\\BlockComponent",
"type": "->"
},
]
}
}
The error message indicates that $client_model is null when an array is expected in BlockComponent.php.
This occurs when interacting with the Experience Builder UI while the Test Block Components module is enabled.
Active
1.0
… to be triaged