Make WordPress Core

Opened 9 months ago

Closed 3 months ago

#59121 closed defect (bug) (fixed)

Issue with bulk edit checkbox selection in the post table list.

Reported by: hiteshtalpada's profile hiteshtalpada Owned by: swissspidy's profile swissspidy
Milestone: 6.5 Priority: normal
Severity: normal Version:
Component: Quick/Bulk Edit Keywords: has-patch has-screenshots needs-testing
Focuses: javascript Cc:

Description

Case 1:

  • Select all post items and add them to the bulk edit. remove one item from the bulk edit box. The checkbox in the table header ( select all checkbox ) and footer ( select all checkbox ) should not show checked.

Case 2:

  • Select all post items and add them to the bulk edit. remove all items from the bulk edit box. The checkbox in the table header ( select all checkbox ) and footer ( select all checkbox ) should not show checked.

Case 3:

  • Select some post items and apply bulk edit then after selecting all posts manually, The checkbox in the table header ( select all checkbox ) and footer ( select all checkbox ) should show unchecked.

Case 4:

  • Select all post items and add them to the bulk edit. Remove some items from the bulk edit box. Then, add the post item again in bulk edit. The checkbox in the table header (select all checkbox) and footer (select all checkbox) remains unchecked.

The attachment is added for further clarification.

I have fixed the issue and attached patch.

Attachments (2)

Posts ‹ WordPress Develop — WordPress.mp4 (3.7 MB) - added by hiteshtalpada 9 months ago.
59121.patch (1.3 KB) - added by hiteshtalpada 9 months ago.

Change History (11)

#1 @sabernhardt
9 months ago

  • Component changed from Posts, Post Types to Quick/Bulk Edit
  • Focuses javascript added

#2 @oglekler
7 months ago

  • Keywords needs-testing added
  • Milestone changed from Awaiting Review to 6.5

@hiteshtalpada thank you for the patch. I tried it mostly to check that it is still can be applied and we don't need to rebase, it works and from my point of view looks nice, but we need to do proper testing.

This ticket was mentioned in Slack in #core by abhanonstopnews. View the logs.


5 months ago

#4 @webcommsat
5 months ago

I tested this patch prior to today's bug scrub, and had no issues with it. The patch needs further testing and this was encouraged in the scrub.

#5 @ugyensupport
5 months ago

Issue with bulk edit checkbox selection in the post table list.

Description

bulk edit checkbox selection in the post table list should not show checked

Environment

  • WordPress: 6.4.2
  • PHP: 8.3.0
  • Server: Apache/2.4.54 (Unix) mod_fastcgi/mod_fastcgi-SNAP-0910052141 OpenSSL/1.0.2u mod_wsgi/3.5 Python/2.7.18
  • Database: mysqli (Server: 5.7.39 / Client: mysqlnd 8.3.0)
  • Browser: Chrome 120.0.0.0 (macOS)
  • Theme: Twenty Twenty-Four 1.0
  • MU-Plugins: None activated
  • Plugins:
    • Gutenberg 17.2.3
    • WordPress Beta Tester 3.5.5

Steps to Reproduce

  1. Case 1:

Select all post items and add them to the bulk edit. remove one item from the bulk edit box. The checkbox in the table header ( select all checkbox ) and footer ( select all checkbox ) should not show checked. 🐞 Bug occurs.
Case 2:
Select all post items and add them to the bulk edit. remove all items from the bulk edit box. The checkbox in the table header ( select all checkbox ) and footer ( select all checkbox ) should not show checked. 🐞 Bug occurs.
Case 3:
Select some post items and apply bulk edit then after selecting all posts manually, The checkbox in the table header ( select all checkbox ) and footer ( select all checkbox ) should show unchecked. 🐞 Bug occurs.
Case 4:
Select all post items and add them to the bulk edit. Remove some items from the bulk edit box. Then, add the post item again in bulk edit. The checkbox in the table header (select all checkbox) and footer (select all checkboxes) remain unchecked.

Expected Results

  1. ✅ should not show checked

Actual Results

  1. ✅ The above given 59121.patch fixed all the above four cases

This ticket was mentioned in Slack in #core by chaion07. View the logs.


3 months ago

#7 @chaion07
3 months ago

Thanks @hiteshtalpada for reporting this. We reviewed this ticket during a recent bug-scrub session. Based on the feedback received we would suggest the following so that the ticket and move closer to a resolution:

  1. We would encourage volunteers to test this and provide another report for clarification, possibly raising it in the core-test channel
  2. Request @oglekler for a feedback about the progress

Cheers!

Props to @costdev & @mukesh27

#8 @Toru
3 months ago

I checked the issue and the patch on 6.5-beta2-57671-src. 100 posts generated, thus checks were done on a list page showing 20 items per page. Also in ja locale.

  • I was able to reproduce the issue.
  • I tested the patch, and I can confirm that it is good as per expected result.

Here is the mov captrue.
https://drive.google.com/file/d/1FMUj10L7xxKBNAFsGuS7vkq9vJ7oPCYF/view?usp=sharing

#9 @swissspidy
3 months ago

  • Owner set to swissspidy
  • Resolution set to fixed
  • Status changed from new to closed

In 57745:

Quick/Bulk Edit: Ensure the “All” checkbox is properly toggled in certain scenarios.

When removing a single item from the bulk edit box or when adding more items, the “All” checkboxes at the top and bottom of the posts list table should be properly toggled.

Props hiteshtalpada, oglekler, webcommsat, ugyensupport, chaion07, Toru.
Fixes #59121.

Note: See TracTickets for help on using tickets.