The 5.x entity_usage module allows for filtering for content that is entirely unreferenced without needing this module's filter. It can be accomplished by:

  • Create a view of content entities. (If using a view of content revisions, you will need an additional relationship on the content entity.)
  • Add a relationship of "Usage information". Leave "Require this relationship" unchecked.
  • Using that relationship, add a filter for "Entity Usage: Usage count" is empty.

Since the view filter is no longer needed, remove the filter and add an update hook to use the above approach for sites using the existing filter.

Original support post:

Am I mistaken in my belief that we can effectively provide the same Views filtering feature anyway simply be using a combination of a Relationship and Filter criteria as shown in a View I built below...

entity_usage_plus_filter_alternative_view_build

Unless I am deluded, this does exactly what I want, i.e. it shows me any and all entities with a Usage count of ZERO...

entity_usage_plus_filter_alternative_in_action

Comments

sirclickalot created an issue. See original summary.

sirclickalot’s picture

Title: No new filter present? » Do we need this filter?
Category: Bug report » Support request
Issue summary: View changes
jastraat’s picture

@sirclickalot - it looks like you are correct in the 5.x branch! Thank you for sharing!

When I initially created the filter over a year ago, I'm not sure this was available in entity_usage.

It looks like the entity usage relationship only works with the content entity, not with content revisions unfortunately. I was hoping this approach would allow for filtering for content that was unreferenced in the current revision of other content (excluding references in past revisions).

I'll either simply remove the filter part of this module in the 5.x branch or replace the filter with something that allows for excluding references in past revisions.

We'll probably need to write an update hook for sites currently using the existing filter.

jastraat’s picture

Title: Do we need this filter? » Remove unnecessary view filter and create upgrade path to entity_usage native solution
Category: Support request » Task
Issue summary: View changes
jastraat’s picture

Version: 2.0.0-beta1 » 2.0.x-dev