When running batch update, several entities return source id of 0 incorrectly.

Created on 16 October 2024, 2 months ago

Problem/Motivation

When doing batch update with the Enity Usage module, some custom blocks return "0" usage when they are in use. It turns out the source id for those blocks is "0". I've checked the set-up of the blocks and they are identical to some that return expected source ids with expected usages.

The example used here is for a custom block type called "UTC Department Info block". There are almost 100 blocks created with this block type. These blocks are programmatically placed at the bottom of the content on the department pages through Context using a taxonomy id for the individual department.

Steps to reproduce

  • Checked block and block types as source types (along with aggregator feed item, base field override, content, content block, contenty type, context, embed button, fake entity type, field, file, image style, media, media type, menu, paragraph, paragraphs type, responsive image style, role, section association, taxonomy term, taxonomy vocabulary, user, view, and webform) under Settings and ran Batch Update.
  • Went to Views to set-up usage relationship and fields, including count and source id as links to admin pages.

Results

There are 70 departments returning with "0" usage. 29 returning with >1 usages (which include revisions, unfortunately).

The Views configuration is set-up like this issue/comment recommends: https://www.drupal.org/project/entity_usage/issues/3043388#comment-13837964 ✨ Views integration: usage of the latest source revisions Needs review , but with the corrected like this comment: https://www.drupal.org/project/entity_usage/issues/3043388#comment-14217189 and using this patch: https://www.drupal.org/project/entity_usage/issues/3043388#comment-15748425.

πŸ› Bug report
Status

Active

Version

2.0

Component

User interface

Created by

πŸ‡ΊπŸ‡ΈUnited States utcbrij

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

    Involves, uses, or integrates with views. In Drupal 8 core, use the β€œVDC” tag instead.

Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024