next-drupal icon indicating copy to clipboard operation
next-drupal copied to clipboard

NextEntityTypeConfig is not deleted when its correspond entity type is deleted.

Open jrockowitz opened this issue 3 years ago • 2 comments

Steps to reproduce

  • Create a plain vanilla standard instance of Drupal with the Article content type.
  • Install the Next.js module
  • Configure Next.js Entity Type for Content: Article (node.article) - /admin/config/services/next/entity-types/add
  • Delete the Article content type - /admin/structure/types/manage/article/delete
  • View 'Next.js entity types' page - /admin/config/services/next/entity-types
  • Confirm that Warning: Undefined array key "article" in Drupal\next\NextEntityTypeConfigListBuilder->buildRow() is displayed or logged.

Thoughts/Notes

  • The Next.js Entity Type config file has no dependencies listed.
  • Adding the '{entity_type_id}.{bundle}' as a dependency might fix the issue.

jrockowitz avatar Aug 22 '22 17:08 jrockowitz

Confirmed this is a bug. Thanks for the suggested fix. Looking into it.

Happy to have you here @jrockowitz :)

shadcn avatar Aug 24 '22 16:08 shadcn

I didn't see this when I opened https://github.com/chapter-three/next-drupal/issues/599 but I have a proposed fix in https://github.com/chapter-three/next-drupal/pull/620

mglaman avatar Dec 07 '23 21:12 mglaman