Make WordPress Core

Opened 6 weeks ago

Last modified 6 weeks ago

#65160 new defect (bug)

Misleading error message on user screen actions, if no role has been selected

Reported by: presskopp's profile Presskopp Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: Users Keywords: has-patch
Focuses: ui Cc:

Description

similar to #64659, when on users.php no bulk action and also no role was selected, and the 'Change' button gets pressed, an error maessage appears claiming "Please select a bulk action to perform.". It's misleading because the underlying issue is that no user has been selected. Even when you select a bulk action like "Send password reset", the same error message will appear, which totally makes no sense.

Change History (3)

#1 @hbhalodia
6 weeks ago

Hi @Presskopp,

I’m not entirely sure what the exact issue is here, as the current wording looks correct to me. I reviewed the following test cases, and all of them appear to behave as expected without showing misleading messages.

Could you please review the cases below and clarify what specifically needs to be updated? Once clarified, we can also check with the wider team to determine whether other users feel the wording should be changed.

  1. No bulk action selected, no role change selected, no users selected — Click Apply
    • Message: Please select a bulk action to perform. — Does not appear misleading.
  2. No bulk action selected, no role change selected, no users selected — Click Change
    • Message: Please select a bulk action to perform. — Looks misleading, should be something like Please select a role to change.
  3. No bulk action selected, no role change selected, users selected — Click Apply
    • Message: Please select a bulk action to perform. — Does not appear misleading.
  4. No bulk action selected, no role change selected, users selected — Click Change
    • Message: Please select a bulk action to perform. — Does not appear misleading.
  5. Password Reset bulk action selected, no role change selected, no users selected — Click Apply
    • Message: Please select at least one item to perform this action on. — Does not appear misleading.
  6. Password Reset bulk action selected, no role change selected, no users selected — Click Change
    • Message: Please select a bulk action to perform. — Does not appear misleading, as no role change was selected.
  7. Password Reset bulk action selected, no role change selected, users selected — Click Apply
    • Message: Password reset links sent to n users. — Does not appear misleading.
  8. Password Reset bulk action selected, no role change selected, users selected — Click Change
    • Message: Please select a bulk action to perform. — Does not appear misleading, as no role change was selected.
  9. No bulk action selected, Subscriber role selected, no users selected — Click Apply
    • Message: Please select a bulk action to perform. — Does not appear misleading.
  10. No bulk action selected, Subscriber role selected, no users selected — Click Change
    • Message: Please select at least one item to perform this action on. — Does not appear misleading.
  11. No bulk action selected, Subscriber role selected, users selected — Click Apply
    • Message: Please select a bulk action to perform. — Does not appear misleading, as the role change option was selected but the bulk action button was clicked.
  12. No bulk action selected, Subscriber role selected, users selected — Click Change
    • Message: Changed roles. — Does not appear misleading.
  13. Password Reset bulk action selected, Subscriber role selected, no users selected — Click Apply
    • Message: Please select at least one item to perform this action on. — Does not appear misleading.
  14. Password Reset bulk action selected, Subscriber role selected, no users selected — Click Change
    • Message: Please select at least one item to perform this action on. — Does not appear misleading.
  15. Password Reset bulk action selected, Subscriber role selected, users selected — Click Apply
    • Message: Password reset links sent to n users. — Does not appear misleading.
  16. Password Reset bulk action selected, Subscriber role selected, users selected — Click Change
    • Message: Changed roles. — Does not appear misleading.

I believe I have covered all possible cases, and I do not currently see any misleading messages. The only scenario that may be worth reconsidering is when users click Change or Apply without making any selection, as both currently display the same message:

Please select a bulk action to perform.

Perhaps when clicking Change, the message could instead be something like:

Please select a role to change.

That is the only potential improvement I can currently identify.

Thanks,

Last edited 6 weeks ago by hbhalodia (previous) (diff)

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


6 weeks ago
#2

  • Keywords has-patch added

Trac ticket: https://core.trac.wordpress.org/ticket/65160

## Description

  • Update the message on users.php list when a role change action is performed without selecting any role, which says Please select a bulk action to perform., instead added Please select a role to change. so that users does not mislead the information.

## Use of AI Tools

  • None

#3 @hbhalodia
6 weeks ago

Hi @Presskopp, As per the above comment, I have added a PR which shows the correct message when user clicks role to change or a bulk action to change. You can test the PR and also check all the test cases and share any misleading message or improvement needed.

Thanks,

Note: See TracTickets for help on using tickets.