Empty field message is not hidden when FE is switched off
>>> [!note] Migrated issue
<!-- Drupal.org comment -->
<!-- Migrated from issue #3541489. -->
Reported by: [a.dmitriiev](https://www.drupal.org/user/3235287)
Related to !126
>>>
<h3 id="summary-problem-motivation">Problem/Motivation</h3>
<p>In case the entity reference (revisions) field is empty, frontend editing adds the link to it in order to be able to add new referenced items directly from frontend editing. But this link doesn't disappear when frontend editing is switched off.</p>
<h4 id="summary-steps-reproduce">Steps to reproduce</h4>
<ol>
<li>Install module.</li>
<li>Create a content type with entity reference (revisions) field.</li>
<li>Allow frontend editing on this entity reference (revisions) field.</li>
<li>Allow adding new items in the formatter for this field.</li>
<li>Create new content item, but do not provide any value for this field.</li>
<li>Observe that field renders with a frontend editing action link 'No items found for field "<your field name>", click to add one.'</your></li>
<li>Toggle frontend editing functionality with "On/Off" button.</li>
<li>Observe that the link is not hidden when frontend editing functionality is hidden.</li>
</ol>
issue