Exception when deleting multiple translations of a content which has moderation enabled

Created on 26 March 2019, over 5 years ago
Updated 13 September 2024, 2 months ago

Problem/Motivation

STR:
1. Use a content moderated translatable bundle. E.g. Configure standard profile with articles translatable.
2. Create some languages.
3. Create an article with multiple translations.
4. In the content view, try to delete all of them but the default language.

Expected result:
Translations are deleted.

Current result:

The website encountered an unexpected error. Please try again later.</br></br><em class="placeholder">Drupal\Core\Entity\EntityStorageException</em>: The specified translation (ca) cannot be removed. in <em class="placeholder">Drupal\Core\Entity\Sql\SqlContentEntityStorage-&gt;save()</em> (line <em class="placeholder">833</em> of <em class="placeholder">core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php</em>). <pre class="backtrace">Drupal\content_moderation\EntityOperations-&gt;entityTranslationDelete(Object) (Line: 147)
content_moderation_entity_translation_delete(Object)
call_user_func_array(&#039;content_moderation_entity_translation_delete&#039;, Array) (Line: 403)
Drupal\Core\Extension\ModuleHandler-&gt;invokeAll(&#039;entity_translation_delete&#039;, Array) (Line: 206)
Drupal\Core\Entity\EntityStorageBase-&gt;invokeHook(&#039;translation_delete&#039;, Object) (Line: 835)
Drupal\Core\Entity\ContentEntityStorageBase-&gt;invokeHook(&#039;translation_delete&#039;, Object) (Line: 789)
Drupal\Core\Entity\ContentEntityStorageBase-&gt;invokeTranslationHooks(Object) (Line: 717)
Drupal\Core\Entity\ContentEntityStorageBase-&gt;doPostSave(Object, 1) (Line: 451)
Drupal\Core\Entity\EntityStorageBase-&gt;save(Object) (Line: 824)
Drupal\Core\Entity\Sql\SqlContentEntityStorage-&gt;save(Object) (Line: 394)
Drupal\Core\Entity\EntityBase-&gt;save() (Line: 275)
Drupal\Core\Entity\Form\DeleteMultipleForm-&gt;submitForm(Array, Object)
call_user_func_array(Array, Array) (Line: 111)

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

πŸ› Bug report
Status

Closed: cannot reproduce

Version

11.0 πŸ”₯

Component
Content moderationΒ  β†’

Last updated 3 days ago

  • Maintained by
  • πŸ‡¦πŸ‡ΊAustralia @Sam152
Created by

πŸ‡ͺπŸ‡ΈSpain penyaskito Seville πŸ’ƒ, Spain πŸ‡ͺπŸ‡Έ, UTC+2 πŸ‡ͺπŸ‡Ί

Live updates comments and jobs are added and updated live.
  • D8MI

    (Drupal 8 Multilingual Initiative) is the tag used by the multilingual initiative to mark core issues (and some contributed module issues). For versions other than Drupal 8, use the i18n (Internationalization) tag on issues which involve or affect multilingual / multinational support. That is preferred over Translation.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    This issue is being reviewed by the kind folks in Slack, #needs-review-queue-initiative. We are working to keep the size of Needs Review queue [2700+ issues] to around 400 (1 month or less), following Review a patch or merge request β†’ as a guide.

    Tried testing in D10 with a standard install
    Added 3 languages in addition to default
    Created a basic page with all 3 translations
    Bulk deleted all but default one.
    Deleted just fine

    There an additional step?

  • Status changed to Closed: cannot reproduce 2 months ago
  • πŸ‡¦πŸ‡ΊAustralia pameeela

    No additional info provided so I'm closing this, if anyone is able to reproduce it please update the issue summary with steps.

Production build 0.71.5 2024