Make WordPress Core

Opened 5 years ago

Last modified 13 months ago

#48553 assigned defect (bug)

"Admin Color Scheme" should not be saved before hitting the "Update Profile" button in profile page

Reported by: mukto90's profile mukto90 Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 3.8
Component: Users Keywords: has-screenshots has-patch has-testing-info
Focuses: ui, administration Cc:

Description

On the profile page (/wp-admin/profile.php) when you click on a color scheme, it instantly updates (via AJAX) in the user meta and changes the color.

I think this should not happen. User meta should be updated only after they hit the "Update Profile" button. It's OK to show the color (preview) as soon as they click an option, but storing the value in the database should be updated along with other info after clicking the save button.
https://s.nimbusweb.me/attachment/3516583/0ug6f4ro5vxd2e91ggdm/alEdMIiK5cCc8V2P/screenshot-core.wp-2019.11.10-17_25_46.png

Attachments (2)

48553.diff (447 bytes) - added by mukto90 5 years ago.
I've attached a patch
screenshot-core.wp-2019.11.10-17_25_46.png (77.7 KB) - added by SergeyBiryukov 5 years ago.

Download all attachments as: .zip

Change History (6)

@mukto90
5 years ago

I've attached a patch

#1 @mukto90
5 years ago

  • Keywords has-patch added; needs-patch removed

#2 @earnjam
5 years ago

I think previewing it and not saving it would be more confusing. Users would see the color scheme they want, then navigate away from the page where it would be reverted back to the previous value.

There is probably some discussion about this from back when this was first added, but I can’t find it right now.

#3 @earnjam
5 years ago

  • Focuses ui administration added
  • Version changed from trunk to 3.8

#4 @alvitazwar052
13 months ago

  • Keywords has-testing-info added

Test Report

Patch tested: https://core.trac.wordpress.org/attachment/ticket/48553/48553.diff

Environment

  • OS: macOS 12.4
  • Web Server: Nginx
  • PHP: 7.4.33
  • WordPress: 6.3-alpha-55505-src
  • Browser: Chrome
  • Theme: Twenty Twenty-two, Twenty-nineteen

ScreenCast

Before applying the patch: https://www.loom.com/share/fee1873fe6ec41e6bb105f59e5b26581
After applying the patch: https://www.loom.com/share/8610ef1921bb4f1b880fa2dd69d5194d

Notes

After applying the patch, the user needs to click Update profile to change the color scheme.

Actual Results

  • The patch is working as expected✅
Note: See TracTickets for help on using tickets.