Menu link indexing breaks when parent column is filled with none existing value
>>> [!note] Migrated issue <!-- Drupal.org comment --> <!-- Migrated from issue #2927190. --> Reported by: [seanb](https://www.drupal.org/user/545912) >>> <h3 id="summary-problem-motivation">Problem/Motivation</h3> <p>For some reason we had some menu links in the database where the <code>parent</code> column in the database was filled with references to no longer existing menu items. This might expose a bug somewhere else, but I think the process to fill the menu_entity_index table should probably not break on this. </p> <p>Maybe we could/should add a warning to the user about this, but I guess that is not the responsibility of this module.</p> <h3 id="summary-proposed-resolution">Proposed resolution</h3> <p>Check if the parent actually exists and return <code>$level = 0</code> otherwise.</p> <h3 id="summary-remaining-tasks">Remaining tasks</h3> <p>-</p> <h3 id="summary-ui-changes">User interface changes</h3> <p>-</p> <h3 id="summary-api-changes">API changes</h3> <p>-</p> <h3 id="summary-data-model-changes">Data model changes</h3> <p>-</p>
issue