[TO HOTFIX] Not all strings can be exported because data integrity issue
>>> [!note] Migrated issue <!-- Drupal.org comment --> <!-- Migrated from issue #3536786. --> Reported by: [huzooka](https://www.drupal.org/user/281301) Related to !16 >>> <h3 id="summary-problem-motivation">Problem/Motivation</h3> <p>The data integrity issue reported in <span class="drupalorg-gitlab-issue-link drupalorg-gitlab-link-wrapper"><a href="https://git.drupalcode.org/project/babel/-/work_items/3536782" class="drupalorg-gitlab-link">https://git.drupalcode.org/project/babel/-/work_items/3536782</a></span> prevents the export of all strings without involving manual DB queries before the operation. Right now, this bug actually blocks my team to create exports for our translator team.</p> <h4 id="summary-steps-reproduce">Steps to reproduce</h4> <p>Initial steps are the same as at <span class="drupalorg-gitlab-issue-link drupalorg-gitlab-link-wrapper"><a href="https://git.drupalcode.org/project/babel/-/work_items/3536782" class="drupalorg-gitlab-link">https://git.drupalcode.org/project/babel/-/work_items/3536782</a></span>.</p> <ol> <li>Install Drupal with minimal profile: <code>drush si minimal -y</code></li> <li>Enable Babel <code>drush en babel -y</code> (maybe also toolbar)</li> <li>Count the records with unique hashes in "babel_source": <code>SELECT COUNT(innerQuery.*) FROM (SELECT DISTINCT hash FROM babel_source) innerQuery</code>. On my system with the current core, this is 75.</li> <li>Enable Estonian language: <code>drush php:eval "\Drupal\language\Entity\ConfigurableLanguage::createFromLangcode('et')-&gt;save();"</code></li> <li>Log in, then visit export form ar <code>/admin/config/regional/babel/export</code> and create an export</li> <li>Count the rows in the spreadsheet and compare it with the number of unique hashes in the <code>babel_source</code> table</li> </ol> <h3 id="summary-proposed-resolution">Proposed resolution</h3> <p>During export, include also the sources which lack any record in the status table.<br> Leave comment at the modified lines referencing the ticket <span class="drupalorg-gitlab-issue-link drupalorg-gitlab-link-wrapper"><a href="https://git.drupalcode.org/project/babel/-/work_items/3536782" class="drupalorg-gitlab-link">https://git.drupalcode.org/project/babel/-/work_items/3536782</a></span>: <code>// Revisit this in https://drupal.org/i/3536782.</code></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