Custom entity within block shown as "Live on page" even when removed from node

Created on 28 March 2024, 8 months ago

Problem/Motivation

I have set up Entity Usage to track a 3-tier relationship:

Custom Entity type >> [entity reference] >> Custom Block type (block_content) >> [layout builder] >> Node

I have this patch applied https://www.drupal.org/node/3119521 β†’ though it may not be relevant.

When viewing the usage of my custom entity, I correctly see it as "Live on page" when I"ve placed the block type that references this custom entity on a node using layout builder. When I remove the reference to that custom entity from the block, and save a new revision, I correctly see the entity's usage list say "Translations or previous revisions". However, if I instead remove the block entirely from layout builder and save a new revision, it continues to say "Live on page", even though the block is no longer there.

The problem is that when removing the block entirely from Layout builder, the block itself is not changed from being its default revision, even though the relevant node revision is no longer its default node revision.

πŸ› Bug report
Status

Needs review

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States jessehs Taos, New Mexico

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

Comments & Activities

  • Issue created by @jessehs
  • Status changed to Needs review 8 months ago
  • Open on Drupal.org β†’
    Core: 10.2.x + Environment: PHP 8.1 & MySQL 8
    last update 8 months ago
    Waiting for branch to pass
  • πŸ‡ΊπŸ‡ΈUnited States jessehs Taos, New Mexico

    This patch checks if this is a custom block, and if so, if it has a parent that is no longer the default revision, it will change the wording to "Translations or previous revisions" instead of "Live on page".

Production build 0.71.5 2024