Error: Cannot use object of type Drupal\Core\StringTranslation\TranslatableMarkup as array in frontend_editing_preprocess_block() (line 826 of frontend_editing.module).
>>> [!note] Migrated issue
<!-- Drupal.org comment -->
<!-- Migrated from issue #3527811. -->
Reported by: [yannickoo](https://www.drupal.org/user/531118)
Related to !118
>>>
<h3 id="summary-problem-motivation">Problem/Motivation</h3>
<p>When trying to enable Layout Builder for an entity bundle I see this error message:</p>
<pre>Error: Cannot use object of type Drupal\Core\StringTranslation\TranslatableMarkup as array in frontend_editing_preprocess_block() (line 826 of modules/contrib/frontend_editing/frontend_editing.module).</pre><h4 id="summary-steps-reproduce">Steps to reproduce</h4>
<ol>
<li>Open any <em>Manage display</em> page</li>
<li>Tick <em>Use Layout Builder</em> checkbox</li>
<li>Press <em>Save</em>
</li><li>Click <em>Manage layout</em> button
</li></ol>
<h3 id="summary-proposed-resolution">Proposed resolution</h3>
<p>Adding simple <code>if</code> to make sure <code>$entity_reference_item</code> is an array.</p>
issue