Make WordPress Core

Opened 4 years ago

Last modified 3 years ago

#50814 new defect (bug)

Success Message Displays on Failure to Update Site Address

Reported by: megabyterose's profile megabyterose Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 5.4.2
Component: Networks and Sites Keywords: has-patch
Focuses: ui, administration, multisite Cc:

Description

There's a misleading success message, "Site info updated" that displays on page refresh after you attempt to update an individual site's address to one that is already in use.

(I'll attach a screen recording of an example!)

Attachments (1)

site-address-wont-save.gif (67.3 KB) - added by megabyterose 4 years ago.
Screen recording of updating a site address to an already-existing address, which shows success message but should be an error message.

Download all attachments as: .zip

Change History (5)

@megabyterose
4 years ago

Screen recording of updating a site address to an already-existing address, which shows success message but should be an error message.

#1 @megabyterose
4 years ago

For clarification on the example recording, 20041465.travsearch.com already existed within the network when I attempted to rename travsearch.com/20041465 to 20041465.travsearch.com. This is the example that made me discover the bug (the success message instead of an error).

#2 @SergeyBiryukov
4 years ago

  • Focuses ui administration added
  • Keywords needs-patch added

This ticket was mentioned in PR #2310 on WordPress/wordpress-develop by metodiew.


3 years ago
#3

  • Keywords has-patch added; needs-patch removed

Here I'm adding a new class for the dashboard notice class, as we have "notice" even if the update fails.
In addition to that adding a new check if update_blog_details() returns, as it's returning only false.

I guess the code would need some refactoring and we can place a few apply_filters() for future extendibility, but wanted to share the first version first.

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

#4 @metodiew
3 years ago

Hey hey, I've added a new pull request for this ticket and sharing the PR message here as well. Open to feedback for the approach!

Here I'm adding a new class for the dashboard notice class, as we have notice even if the update fails.
In addition to that adding a new check if update_blog_details() as it's returning only false.

I guess the code would need some refactoring and we can place a few apply_filters() for future extendibility, but wanted to share the first version first.

Note: See TracTickets for help on using tickets.