Make WordPress Core

Opened 2 weeks ago

Closed 5 days ago

Last modified 28 hours ago

#64659 closed defect (bug) (fixed)

Misleading error message on bulk actions, if no action has been selected

Reported by: presskopp's profile Presskopp Owned by: joedolson's profile joedolson
Milestone: 7.0 Priority: normal
Severity: normal Version:
Component: Quick/Bulk Edit Keywords: has-patch commit
Focuses: ui Cc:

Description

When on the posts (pages) page several posts (pages) have been marked and you click on "Apply" without selecting any action, the following error will be triggered:

Please select at least one item to perform this action on.

But the true issue is that no action was selected.

Related #41080, #62430

Change History (11)

This ticket was mentioned in PR #10978 on WordPress/wordpress-develop by @Presskopp.


2 weeks ago
#1

Improve the bulk action validation notice by distinguishing between:

  • No bulk action selected.
  • No items selected.

This prevents misleading feedback when clicking Apply without choosing a bulk action.

Trac ticket: #64659.

## Use of AI Tools
ChatGPT was used to check the correctness of the patch and guide me on the way.

#2 @Presskopp
2 weeks ago

  • Keywords has-patch added

#3 @joedolson
2 weeks ago

  • Focuses ui added
  • Milestone changed from Awaiting Review to 7.0
  • Owner set to joedolson
  • Status changed from new to accepted

Given the scope of this change, I'm going to go ahead and milestone for 7.0.

#4 @r1k0
7 days ago

Patch Testing Report

Patch Tested: https://github.com/WordPress/wordpress-develop/pull/10978

Environment

  • WordPress: 7.0-alpha-20260219.175647
  • PHP: 8.4.17
  • Server: PHP.wasm
  • Database: WP_SQLite_Driver (Server: 8.0.38 / Client: 3.51.0)
  • Browser: Chrome 145.0.0.0
  • OS: Windows 10/11
  • Theme: Twenty Twenty-Five 1.4
  • MU Plugins: None activated
  • Plugins:
    • Test Reports 1.2.1

Steps taken

  1. In your admin dashboard, head over to Posts.
  2. Click the top checkbox to select items, and then click Apply.
  3. Observe the error message displayed before applying and after applying the patch.
  4. ✅ Patch is solving the problem.

Expected result

  • The error message displays "Please select a bulk action before clicking Apply." after clicking Apply without selecting a bulk action.

Additional Notes

  • The error message is now more descriptive when a user doesn't select a bulk action.

Screenshots/Screencast with results

Before:
https://i.ibb.co/jdkVxQF/bulk-actions-error-before.png
After:
https://i.ibb.co/NdzgfVjt/bulk-actions-error-after.png

Last edited 7 days ago by r1k0 (previous) (diff)

This ticket was mentioned in PR #11077 on WordPress/wordpress-develop by @pratiknawkar94.


6 days ago
#5

Trac ticket:

## Use of AI Tools

#6 @pratiknawkar94
6 days ago

@joedolson I’ve addressed your review comment and pushed an updated PR to help move this ticket forward. Please let me know if anything else is needed.

#7 @joedolson
5 days ago

  • Keywords commit added

#8 @joedolson
5 days ago

  • Component changed from General to Quick/Bulk Edit

#9 @joedolson
5 days ago

  • Resolution set to fixed
  • Status changed from accepted to closed

In 61771:

Quick/Bulk Edit: Fix misleading error on bulk edits.

The same error message was returned whether a user attempted bulk edit without selecting an action or attempted without selecting any posts. These two situations need different messages.

Return error messages appropriate to the actual user error.

Props Presskopp, r1k0, pratiknawkar94, joedolson.
Fixes #64659.

Note: See TracTickets for help on using tickets.