Multiple entities can be set on the target entity reference autocomplete field but only 1 is saved
>>> [!note] Migrated issue
<!-- Drupal.org comment -->
<!-- Migrated from issue #3578386. -->
Reported by: [erichomanchuk](https://www.drupal.org/user/299489)
Related to !93
>>>
<p>[Tracker]<br>
<strong>Update Summary: </strong>[One-line status update for stakeholders]<br>
<strong>Check-in Date: </strong>MM/DD/YYYY<br>
<strong>Blocked by: </strong>[#XXXXXX] (New issues on new lines)<br>
<strong>Additional Collaborators: </strong> @username1, @username2<br>
<em>Metadata is used by the <a href="https://www.drupalstarforge.ai/" title="AI Tracker">AI Tracker.</a> Docs and additional fields <a href="https://www.drupalstarforge.ai/ai-dashboard/docs" title="AI Issue Tracker Documentation">here</a>.</em><br>
[/Tracker]</p>
<h3 id="summary-problem-motivation">Problem/Motivation</h3>
<p>When adding Target Entities to a Context Item multiple entities can be inserted into the entity reference field (dynamic_entity_reference) but when saving only 1 items is stored.</p>
<p>I am adding the issue and linking to a Drupal core issue about this just to document the bug but I think it is a Drupal Core issue #2692289.</p>
<p><strong>Adding Multiple Entities to Entity Reference - Before Save</strong><br>
<img src="https://www.drupal.org/files/issues/2026-03-10/ccc-ui-multiple-entities-before-save.png" alt="Adding multiple entitites"></p>
<p><strong>Only Single Entity Stored on Field - After Save</strong><br>
<img src="https://www.drupal.org/files/issues/2026-03-10/ccc-ui-single-entity-stored-after-save.png" alt="After save single entity"></p>
<h3 id="summary-proposed-resolution">Proposed resolution</h3>
<p>This field is a multi-field and to add another entity reference we should be adding another item to insert an entity. The Entity reference field itself should only allow for a single entity to be added in the autocomplete.</p>
<h3 id="steps-to-reproduce">Steps to reproduce</h3>
<ol>
<li>Add some taxonomy terms or pages</li>
<li>Create a new Context Item and in the scope section of the page select the type and use autocomplete to select multiple entities with a comma inbetween e.g. "Lorem, Ipsum (2)", This is a term (1)
</li><li>Save the context items and the last item on the field will be saved.
</li></ol>
<h3 id="summary-ai-usage">AI usage (if applicable)</h3>
<p>[ ] AI Assisted Issue<br>
This issue was generated with AI assistance, but was reviewed and refined by the creator.</p>
<p>[ ] AI Assisted Code<br>
This code was mainly generated by a human, with AI autocompleting or parts AI generated, but under full human supervision.</p>
<p>[ ] AI Generated Code<br>
This code was mainly generated by an AI with human guidance, and reviewed, tested, and refined by a human.</p>
<p>[ ] Vibe Coded<br>
This code was generated by an AI and has only been functionally tested.</p>
> Related issue: [Issue #2692289](https://www.drupal.org/node/2692289)
issue