Problem/Motivation
The settings form saves `show_unpublished`, but neither the summary-count query nor the fallback content table uses that setting. With the setting disabled, unpublished nodes are still included in total counts and displayed in the fallback table.


Steps to reproduce
- Install Taxonomy Content Report.
- Configure a vocabulary and map a content type's taxonomy reference field.
- Leave `Include unpublished content in counts` unchecked.
- Create one published node and one unpublished node in the mapped content type, both tagged with the configured vocabulary.
- Visit
`/admin/reports/taxonomy-content-report`.
Expected
Unpublished content is excluded from the report while the setting is disabled.
Actual
The unpublished node is included in counts and can appear in the fallback table.
Proposed resolution
Pass the setting into the report query layer and add `n.status = 1` conditions when `show_unpublished` is FALSE. Apply the same behavior to embedded/fallback section rendering where possible.
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | Screenshot from 2026-06-26 16-36-10.png | 41.26 KB | gurkawal |
| image-2.png | 71.79 KB | dkmishra | |
| image-1.png | 87.68 KB | dkmishra |
Issue fork taxonomy_content_report-3606464
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
dkmishra commentedComment #5
gurkawal commentedHi @dkmishra
I was able to reproduce this issue.
The setting “Include unpublished content in counts” was being saved correctly, but it was not being used while building the report data.
Because of this, unpublished nodes were still being counted even when this option was unchecked. The fallback table also had the same issue, so unpublished nodes could still appear there.
I have created a merge request with a small fix so only published nodes are counted and displayed.
When the setting is checked, both published and unpublished nodes are included as before.
Comment #6
sjpeters79 commentedHi @gurkawal. Thanks for the MR. It looks good. I've merged the change.
Comment #7
sjpeters79 commentedComment #9
sjpeters79 commentedI'll tag a release early next week with this fix.
Comment #10
dkmishra commentedHi @sjpeters79,
Thanks for merging this issue.
I noticed that I wasn't granted issue credit. Since I originally reported the issue and proposed the resolution, would you mind adding issue credit for my contribution if you feel it's appropriate?
Thanks!
Comment #11
sjpeters79 commentedHi @dkmishra. I've updated the contribution. Thanks.
Comment #12
dkmishra commentedThank you @sjpeters79