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

adaragao created an issue. See original summary.

riorick17’s picture

This 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",

alexdmccabe’s picture

Status: Active » Needs work

Hi @riorick17!

Could you please create a fork and open a merge request for this?

Thanks!

alexdmccabe’s picture

Version: 8.x-2.x-dev » 3.0.x-dev

alexdmccabe’s picture

Status: Needs work » Fixed

Applied 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.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.