Content count reports for other entity types

Created on 12 March 2024, 8 months ago

Problem/Motivation

The node report provides a quick count of content by type.

I'm looking for the same for block types, and it would be helpful to have for all other entity types.

✨ Feature request
Status

Active

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States mortona2k Seattle

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

Merge Requests

Comments & Activities

  • Issue created by @mortona2k
  • πŸ‡ΊπŸ‡ΈUnited States mortona2k Seattle

    I added a view that lists the blocks and aggregates counts by type.

    This could be improved in a few ways. The counts could link to more views that show a list of the blocks of that type.

    For auditing sites, I create views for each content/block type that shows a table of all the fields. It would be great to be able to automate the setup of this and link to that from the block count.

    This format could apply to other entity types fairly easily, but some considerations are probably needed for the unique aspects of each.

    With content blocks, there is a "resuable" property, and other information that would be helpful to surface, like if the block is enabled somewhere. Not all we need is readily available in views though.

  • Merge request !14Add block count view β†’ (Open) created by mortona2k
  • πŸ‡ΊπŸ‡ΈUnited States swirt Florida

    Thank you Mortona2k. I like the idea and thank you for the contribution.

    I am in the middle of something big so it may take me a few days to get to a proper review of this.

    I have been moving a bit away from using actual Views because they are such a pain to try to update once they have been rolled out. And even adding here, most existing sites using the module will never see the nice View you created because they are not installing the module from scratch so it never gets created.

    I have built a rudimentary reporting framework that is better for these kinds of things because any improvements roll out to everyone.
    There is a little bit of Report making guidance here. And the file NodeCount.php has most of what you would be needed as an example. If you feel like giving it a try, that would be great. If not I can likely get to converting the View into a report in a week or two.

  • πŸ‡ΊπŸ‡ΈUnited States mortona2k Seattle

    Thanks for the feedback and explaining those architecture choices. Makes sense, I've encountered that hassle of updating view config before.

    I don't have a ton of time into developing reports, but I'll try to contribute where I can. I'm working on analyzing a site for an extension project, and this module already saved some time in exploring the entity relationships. I'll mostly drop in ideas I think would be useful for the module and try to implement the ones I need most first.

Production build 0.71.5 2024