Make WordPress Core

Changeset 61771


Ignore:
Timestamp:
02/27/2026 11:56:23 PM (8 days ago)
Author:
joedolson
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/js/_enqueues/admin/common.js

    r60186 r61771  
    13511351        $( 'html, body' ).animate( { scrollTop: 0 } );
    13521352
    1353         var errorMessage = __( 'Please select at least one item to perform this action on.' );
     1353        var errorMessage = value !== '-1' ?
     1354            __( 'Please select at least one item to perform this action on.' ) :
     1355            __( 'Please select a bulk action to perform.' );
    13541356        addAdminNotice( {
    1355             id: 'no-items-selected',
     1357            id: value !== '-1' ? 'no-items-selected' : 'no-bulk-action-selected',
    13561358            type: 'error',
    13571359            message: errorMessage,
Note: See TracChangeset for help on using the changeset viewer.