Duplicate rows for some entities with multiple entity references
>>> [!note] Migrated issue <!-- Drupal.org comment --> <!-- Migrated from issue #3452532. --> Reported by: [apkwilson](https://www.drupal.org/user/2643225) Related to !29 >>> <h3 id="summary-problem-motivation">Problem/Motivation</h3> <p>When a single entity on a calendar has multiple entity references generating a row, the single entity can sometimes be displayed multiple times. Calendar checks for this, but the check only works if the two instances of the single entity are rendered sequentially. If another entity is rendered in between, the check fails. This is an issue with recurring dates and was called noticed in the <code>smart_date</code> queue at <span class="drupalorg-gitlab-issue-link project-issue-status-info project-issue-status-8"><a href="https://www.drupal.org/project/smart_date/issues/3177760" title="Status: Needs review">#3177760: Support Calendar module</a></span>.</p> <h4 id="summary-steps-reproduce">Steps to reproduce</h4> <ol> <li>Install <code>calendar</code>, <code>smart_date</code>, <code>smart_date_recur</code>.</li> <li>Patch calendar per <span class="drupalorg-gitlab-issue-link drupalorg-gitlab-link-wrapper"><a href="https://git.drupalcode.org/project/calendar/-/work_items/3177761" class="drupalorg-gitlab-link">https://git.drupalcode.org/project/calendar/-/work_items/3177761</a></span> and smart_date per <span class="drupalorg-gitlab-issue-link project-issue-status-info project-issue-status-8"><a href="https://www.drupal.org/project/smart_date/issues/3177760" title="Status: Needs review">#3177760: Support Calendar module</a></span>.</li> <li>Set up a content type with a smart_date recurring field.</li> <li>Create two nodes of that type. The smart_date field of one must recur over at least two dates. The date of the other node must be between the two occurrences of the first node.</li> <li>Set up a calendar such that it displays all dates of both nodes at once. The occurrences of the first node will appear twice.</li> </ol> <h3 id="summary-proposed-resolution">Proposed resolution</h3> <p>Alter the check for repeated entities so that it remembers all entities processed, not just the last.</p> <h3 id="summary-remaining-tasks">Remaining tasks</h3> <p>none</p> <h3 id="summary-ui-changes">User interface changes</h3> <p>n/a</p> <h3 id="summary-api-changes">API changes</h3> <p>n/a</p> <h3 id="summary-data-model-changes">Data model changes</h3> <p>n/a</p> > Related issue: [Issue #3177760](https://www.drupal.org/node/3177760)
issue