[ai_translate] Error: Call to a member function hasTranslation() on null
>>> [!note] Migrated issue <!-- Drupal.org comment --> <!-- Migrated from issue #3475579. --> Reported by: [thomas schuh](https://www.drupal.org/user/3069555) >>> <h3 id="summary-problem-motivation">Problem/Motivation</h3> <p>There are cases where ReferenceFieldExtractor.php-&gt;setValue() has an empty $referencedEntities array, which causes the error. I'm not sure if such reports are really helpful to you. Please advise.</p> <h4 id="summary-steps-reproduce">Steps to reproduce</h4> <p>Create node-type with reverence field<br> Add Node and translate it</p> <h3 id="summary-proposed-resolution">Proposed resolution</h3> <h3 id="summary-remaining-tasks">Remaining tasks</h3> <h3 id="summary-ui-changes">User interface changes</h3> <h3 id="summary-api-changes">API changes</h3> <p>Check if the array is not empty. </p> <h3 id="summary-data-model-changes">Data model changes</h3>
issue