Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 292644

EntityStorageException: Default revision can not be deleted in content_moderation_entity_revision_delete()

$
0
0

Problem/Motivation

This happens if you try to delete to delete the only pending revision of an entity that was created *before* enabling workflows, so the previous default revision didn't have a content_moderation entity.

Steps to reproduce:

1. Create an article.
2. Enable content_moderation, enable it for article
3. Create a draft
4. Delete that draft.
5. Boom.

The website encountered an unexpected error. Please try again later.</br></br><em class="placeholder">Drupal\Core\Entity\EntityStorageException</em>: Default revision can not be deleted in <em class="placeholder">Drupal\Core\Entity\ContentEntityStorageBase-&gt;deleteRevision()</em> (line <em class="placeholder">677</em> of <em class="placeholder">core/lib/Drupal/Core/Entity/ContentEntityStorageBase.php</em>). <pre class="backtrace">Drupal\content_moderation\EntityOperations-&gt;entityRevisionDelete(Object) (Line: 118)
content_moderation_entity_revision_delete(Object)
call_user_func_array(&#039;content_moderation_entity_revision_delete&#039;, Array) (Line: 403)
Drupal\Core\Extension\ModuleHandler-&gt;invokeAll(&#039;entity_revision_delete&#039;, Array) (Line: 206)
Drupal\Core\Entity\EntityStorageBase-&gt;invokeHook(&#039;revision_delete&#039;, Object) (Line: 756)
Drupal\Core\Entity\ContentEntityStorageBase-&gt;invokeHook(&#039;revision_delete&#039;, Object) (Line: 681)
Drupal\Core\Entity\ContentEntityStorageBase-&gt;deleteRevision(&#039;2&#039;) (Line: 117)
Drupal\node\Form\NodeRevisionDeleteForm-&gt;submitForm(Array, Object)

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes


Viewing all articles
Browse latest Browse all 292644

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>