27 · Added translations miss required fields ("Column 'status' cannot be null"); orphaned English versions on monolingual sites¶
| Project | Default Content Locale |
| Component | Code |
| Category | Bug report |
| Priority | Major |
| Status | Reported upstream as #1 |
Problem/Motivation¶
a) Added translations only contain the translated text fields. Required translatable fields such as status are saved as NULL → "Integrity constraint violation: Column 'status' cannot be null" (e.g. taxonomy terms of Drupal CMS site templates).
b) On a monolingual non-English installation (Drupal CMS installer: English exists during the import and is removed at the end), the module adds a translation next to the English original. An orphaned English version of every entity remains, and content shows up twice in listings.
Steps to reproduce¶
a) Import default content with taxonomy terms while a second language with locale translations is installed. b) Install Drupal CMS in German with a site template → every node has an English and a German version, although English is removed.
Proposed resolution¶
a) Copy all remaining fields of the source into the added translation. b) If the target language is the site's content language, replace the English values in place instead of adding a translation.
Additional information¶
Both are solved in the fork dcle, which could be contributed back. Many thanks for the original module!
Copy to drupal.org
Issue title:
Added translations miss required fields ("Column 'status' cannot be null"); orphaned English versions on monolingual sites
Issue summary (paste it into the "Issue summary" field; project, component, category and priority are in the table above):
<h3 id="summary-problem-motivation">Problem/Motivation</h3>
<p>a) Added translations only contain the translated text fields. Required translatable fields such as <code>status</code> are saved as NULL → "Integrity constraint violation: Column 'status' cannot be null" (e.g. taxonomy terms of Drupal CMS site templates).</p>
<p>b) On a monolingual non-English installation (Drupal CMS installer: English exists during the import and is removed at the end), the module adds a translation next to the English original. An orphaned English version of every entity remains, and content shows up twice in listings.</p>
<h3 id="summary-steps-reproduce">Steps to reproduce</h3>
<p>a) Import default content with taxonomy terms while a second language with locale translations is installed.
b) Install Drupal CMS in German with a site template → every node has an English and a German version, although English is removed.</p>
<h3 id="summary-proposed-resolution">Proposed resolution</h3>
<p>a) Copy all remaining fields of the source into the added translation.
b) If the target language is the site's content language, replace the English values in place instead of adding a translation.</p>
<h3>Additional information</h3>
<p>Both are solved in the fork <code>dcle</code>, which could be contributed back. Many thanks for the original module!</p>