Comment types do not depend on the provider of the target entity type

Created on 3 May 2016, about 8 years ago
Updated 23 January 2023, over 1 year ago

Problem/Motivation

Comment types do not declare a dependency on the module that provides the target entity type. Thus, if that module is installed, the comment type will remain and using it will lead to fatal errors.

Proposed resolution

Declare the dependency on the provider of the target entity type. In particular implement calculateDependencies() in CommentType. EntityDisplayModeBase::calculateDependencies() can be used as inspiration.

Remaining tasks

<!-- See https://drupal.org/core-mentoring/novice-tasks for tips on identifying novice tasks. Delete or add "Novice" from the Novice? column in the table below as appropriate. Uncomment tasks as the issue advances. Update the Complete? column to indicate when they are done, and maybe reference the comment number where they were done. -->

User interface changes

None.

API changes

None.

The fact that comment types now get appropriately deleted when a module is uninstalled is a change in behavior, but since the comment types that were previously left in the system were completely broken, I don't see how anyone can currently rely on that behavior. Thus, I do not see the need for a change record either.

Data model changes

Comment types have a new entry in their exported configuration dependencies.

πŸ› Bug report
Status

Needs work

Version

10.1 ✨

Component
CommentΒ  β†’

Last updated 3 days ago

Created by

πŸ‡©πŸ‡ͺGermany tstoeckler Essen, Germany

Live updates comments and jobs are added and updated live.
  • Needs issue summary update

    Issue summaries save everyone time if they are kept up-to-date. See Update issue summary task instructions.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    This issue is being reviewed by the kind folks in Slack, #needs-review-queue-initiative. We are working to keep the size of Needs Review queue [2700+ issues] to around 400 (1 month or less), following Review a patch or merge request β†’ as a guide.

    At this time we will need a D10 MR of this issue.
    Since it's been 5 years tagged for IS update if any of the remaining tasks have changed as the module has been updated some.

Production build 0.69.0 2024