Prevent deleting Code Components if there are usages in forward revisions

Created on 2 October 2025, 6 days ago

Overview

πŸ“Œ Only allow deleting Code Components if there's 0 usages Active made it so that Canvas prevents you from deleting Code Components if they are being used on a Page's draft content that's in auto-save storage, but does not prevent that if that same draft content is in a forward revision instead of auto-save storage. That makes no sense: for the purpose of considering a Code Component as "in use", draft content should count the same whether it's in auto-save storage or in a forward revision.

Proposed resolution

Add onto the code that was added in πŸ“Œ Only allow deleting Code Components if there's 0 usages Active to also query forward revisions for usage.

User interface changes

πŸ› Bug report
Status

Needs work

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States effulgentsia

Live updates comments and jobs are added and updated live.
  • Usability

    Makes Drupal easier to use. Preferred over UX, D7UX, etc.

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.

No activities found.

Production build 0.71.5 2024