While installing token module will loop through all entity types, and create a token view mode for that entity (Including custom entity).But these view modes are not getting cleaned if the entity got deleted / removed from the project.

Created on 6 February 2024, 5 months ago

Problem/Motivation

While installing token module, It will loop through all entity types, and create a token view mode for that entity (Including custom entity).But these view modes are not getting cleaned if the entity got deleted / removed from the project.

Steps to reproduce

Step 1 : Install Apigee API Catalog version 3.0.4. (This version is having a custom entity "apidoc")
Step 2 : Install the Token module. -> It will create view modes for all available entity including "apidoc". [https://git.drupalcode.org/project/token/-/blob/8.x-1.x/token.install?re...
Step 3 : Upgrade Apigee API Catalog to version 3.0.5. In this version the custom entity has been removed. But the view mode which was created by the token module still exists in the project.
Step 4 : Attempt to access the previously created view mode, We can Observe the error indicating that the entity does not exist. [The "apidoc" entity type does not exist].

Proposed resolution

The Token module should recognize the deletion of the custom entity and automatically delete the corresponding view mode to prevent errors.

🐛 Bug report
Status

Active

Version

1.13

Component

Code

Created by

🇮🇳India ananthakrishnan.kr

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.69.0 2024