Make WordPress Core

Opened 4 years ago

Last modified 3 months ago

#56241 new defect (bug)

The post category count according post data not showing on admin side.

Reported by: rima1889's profile rima1889 Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: Posts, Post Types Keywords: has-screenshots needs-patch has-test-info
Focuses: administration Cc:

Description (last modified by sabernhardt)

we are created category as parent and child relationship. This category shows on the category listing with count number. The clicking on the count show all post which are assigned category and redirect to post listing page. But the no of count shows for parent category with child category. I mean to say not show only parent category count.

Screenshots: Categories screen and Posts listing

Attachments (2)

30272055.png (179.5 KB) - added by sabernhardt 4 years ago.
Categories screen
30272057.png (93.2 KB) - added by sabernhardt 4 years ago.
Posts listing

Download all attachments as: .zip

Change History (7)

#1 @SergeyBiryukov
4 years ago

Hi there, welcome back to WordPress Trac! Thanks for the ticket.

Just linking to some related tickets here: #1062, #16397, #24187.

Last edited 4 years ago by SergeyBiryukov (previous) (diff)

@sabernhardt
4 years ago

Categories screen

@sabernhardt
4 years ago

Posts listing

#2 @sabernhardt
4 years ago

  • Description modified (diff)
  • Focuses performance removed
  • Keywords needs-dev-note removed

#3 @huzaifaalmesbah
4 months ago

Reproduction Report

Description

This test verifies whether the category post count shown on the Categories admin screen matches the actual posts displayed when filtering by a parent category in the Posts list.

Environment

  • WordPress: 7.0-alpha-61215-src
  • PHP: 8.4.12
  • Server: nginx/1.29.1
  • Database: mysqli (Server: 9.4.0 / Client: mysqlnd 8.4.12)
  • Browser: Chrome 143.0.0.0
  • OS: macOS
  • Theme: Twenty Twenty-Five 1.4
  • MU Plugins: None activated
  • Plugins:
    • Test Reports 1.2.1

Steps to Reproduce

  1. Create a parent category named “Test Main”.
  2. Create two child categories under it: “Test Sub 1” and “Test Sub 2”.
  3. Create two posts:
  • One post assigned only to “Test Sub 2”.
  • One post assigned to both “Test Main” and “Test Sub 1”.
  1. Go to Posts → All Posts and filter posts by the “Test Main” category.
  2. Go to Posts → Categories and observe the category counts.

Actual Results

  • ✅ The issue is reproduced.
  • On the Categories screen:
  • Test Main (parent) → Count = 1
  • Test Sub 1 → Count = 1
  • Test Sub 2 → Count = 1
  • On the Posts list screen:
  • Filtering by “Test Main” displays 2 posts

Status

Issue still present / Not resolved

Screenshots

Categories screen Posts list screen
https://i.ibb.co.com/cKMY9GYN/Huzaifa-20251218215524.png https://i.ibb.co.com/W47rNJ6n/Huzaifa-20251218215534.png

This ticket was mentioned in Slack in #core-test by huzaifaalmesbah. View the logs.


4 months ago

#5 @huzaifaalmesbah
3 months ago

  • Keywords needs-patch has-test-info added; needs-testing removed

Removing needs-testing and adding needs-patch and has-test-info based on the results.

Note: See TracTickets for help on using tickets.