- Issue created by @upunkt
Got to /admin/structure/block/block-content, add a new parallax block. Skip adding an extra class. Activate the block by placing it in any region.
If in settings.php you have set
$config['system.logging']['error_level'] = 'verbose';
// hide|some|all|verbose
this throws a warning whenever the render cache is flushed,
Warning: Array to string conversion in Drupal\Component\Utility\Html::getClass() (line 72 of (...)/web/core/lib/Drupal/Component/Utility/Html.php).
Two possible resolutions.
1. Add a (dummy) class. Beware, just a space translates to a dash -.
2. In block--electra-parallax.html.twig check whether the extra class exists by changing to
{%
set classes = [
'parallax-block',
'parallax-' ~ type|clean_class,
]
%}
{% if content['#block_content'].field_extra_class.value is not empty %}
{% set extra_class = content['#block_content'].field_extra_class.value %}
{% set classes = classes|merge([extra_class|clean_class]) %}
{% endif %}
Please review, thanks.
Active
3.2
Code