Make WordPress Core

Opened 6 months ago

Closed 5 months ago

Last modified 5 months ago

#64659 closed defect (bug) (fixed)

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

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

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.


6 months 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
6 months ago

  • Keywords has-patch added

#3 @joedolson
6 months ago

  • Focuses ui added
  • Milestone Awaiting Review7.0
  • Owner set to joedolson
  • Status newaccepted

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

#4 @r1k0
6 months 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 6 months ago by r1k0 (previous) (diff)

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


5 months ago
#5

Trac ticket:

## Use of AI Tools

#6 @pratiknawkar94
5 months 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 months ago

  • Keywords commit added

#8 @joedolson
5 months ago

  • Component GeneralQuick/Bulk Edit

#9 @joedolson
5 months ago

  • Resolutionfixed
  • Status acceptedclosed

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.