In some circumstances, the entityValidate method of EntityProcessorBase causes an exception to be thrown when trying to render error messages.
TypeError: Drupal\Component\Utility\Html::escape(): Argument #1 ($text) must be of type string, null given, called in /var/www/html/public_html/core/lib/Drupal/Component/Render/FormattableMarkup.php on line 238 in Drupal\Component\Utility\Html::escape() (line 433 of /var/www/html/public_html/core/lib/Drupal/Component/Utility/Html.php).
This is coming from $this->renderer->renderRoot($element)
, when trying to run an import with the attached feed config.
Stepping through in xdebug, I could see that the value of $element was:
array (
#theme => 'item_list',
#items =>
array (
0 =>
Drupal\Component\Render\FormattableMarkup::__set_state(array(
string => '@property_name: @error',
arguments =>
array (
@property_name => 'field_address.0.administrative_area',
@error =>
Drupal\Core\StringTranslation\TranslatableMarkup::__set_state(array(
string => '@name field must be blank.',
arguments =>
array (
@name => null,
),
translatedMarkup => null,
options =>
array (
langcode => null,
),
stringTranslation => null,
)),
),
)),
1 =>
Drupal\Component\Render\FormattableMarkup::__set_state(array(
string => '@property_name: @error',
arguments =>
array (
@property_name => 'field_address.0.dependent_locality',
@error =>
Drupal\Core\StringTranslation\TranslatableMarkup::__set_state(array(
string => '@name field must be blank.',
arguments =>
array (
@name => null,
),
translatedMarkup => null,
options =>
array (
langcode => null,
),
stringTranslation => null,
)),
),
)),
),
)
Ensure that the exception is not thrown so that the error message can be displayed.
Active
3.0
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.