Problem/Motivation
With Drupal 9.1.2, trying to uninstall triggers this exception:
Entity type 'Drupal\Core\Config\Entity\ConfigEntityType' is missing 'config_export' definition in its annotation.
It happens because GDPR Tasks does not have config_export in its annotations.
Steps to reproduce
Install Drupal 9.0
Install GDPR Tasks
Uninstall GDPR Tasks
Proposed resolution
Add a config_export key.
Comments
Comment #2
riorick17 commentedThis seems to get rid of the error
diff --git a/modules/gdpr_tasks/src/Entity/TaskType.php b/modules/gdpr_tasks/src/Entity/TaskType.php
index e457ef2..42fb72c 100644
--- a/modules/gdpr_tasks/src/Entity/TaskType.php
+++ b/modules/gdpr_tasks/src/Entity/TaskType.php
@@ -30,6 +30,11 @@ use Drupal\Core\Config\Entity\ConfigEntityBundleBase;
* "label" = "label",
* "uuid" = "uuid"
* },
+ * config_export = {
+ * "id",
+ * "label",
+ * "uuid"
+ * },
* links = {
* "canonical" = "/admin/gdpr/tasks/gdpr_task_type/{gdpr_task_type}",
* "add-form" = "/admin/gdpr/tasks/gdpr_task_type/add",
Comment #3
alexdmccabeHi @riorick17!
Could you please create a fork and open a merge request for this?
Thanks!
Comment #4
alexdmccabeComment #6
alexdmccabeApplied this by hand, and found that Drupal\gdpr_tasks\Entity\Task was also breaking the install, and needed some changes to the base field definitions.