ScheduledTransitionsUtility::getTargetRevisionIds throws QueryException if entity type has no langcode key
>>> [!note] Migrated issue <!-- Drupal.org comment --> <!-- Migrated from issue #3585905. --> Reported by: [acbramley](https://www.drupal.org/user/1036766) Related to !87 >>> <h3 id="summary-problem-motivation">Problem/Motivation</h3> <p>Try adding a scheduled transition on an entity type without a langcode entity key.</p> <p>Error callstack:</p> <pre>Drupal\Core\Entity\Query\QueryException: '' not found in Drupal\Core\Entity\Query\Sql\Tables-&gt;ensureEntityTable() (line 376 of core/lib/Drupal/Core/Entity/Query/Sql/Tables.php).<br><br>Drupal\Core\Entity\Query\Sql\Tables-&gt;addField() (Line: 58)<br>Drupal\Core\Entity\Query\Sql\Condition-&gt;compile() (Line: 193)<br>Drupal\Core\Entity\Query\Sql\Query-&gt;compile() (Line: 82)<br>Drupal\Core\Entity\Query\Sql\Query-&gt;execute() (Line: 121)<br>Drupal\scheduled_transitions\ScheduledTransitionsUtility-&gt;getTargetRevisionIds() (Line: 364)<br>Drupal\scheduled_transitions\Form\Entity\ScheduledTransitionAddForm-&gt;getRevisionOptions() (Line: 96)<br>Drupal\scheduled_transitions\Form\Entity\ScheduledTransitionAddForm-&gt;form() (Line: 108)</pre><h4 id="summary-steps-reproduce">Steps to reproduce</h4> <p>Enable ST on an entity type without a langcode entity key.</p> <h3 id="summary-proposed-resolution">Proposed resolution</h3> <p>Check for NULL $langcodeK in getTargetRevisionIds</p> <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> <h3 id="summary-data-model-changes">Data model changes</h3>
issue