Project

General

Profile

Actions

Bug #22024

open

Improving site creating error text/flow

Added by Colin McDonald 9 months ago. Updated about 1 month ago.

Status:
New
Priority name:
Normal
Assignee:
Category name:
-
Target version:
Start date:
2025-02-06
Due date:
% Done:

0%

Estimated time:
Deployment actions:

Description

This is minor, but it was frustrating for me when I just discovered it, so perhaps it will save others down the road. When creating a site, if you put only numbers in the domain, it throws an error when trying to proceed that says:

Sorry, site names must have letters too!

That should say "site domains" instead I think, to avoid confusion with the Site Title. See attached screenshot.

It is more frustrating if you're trying to clone a site and this happens, because when the error gets thrown, it takes you back to the "Create a New Site" radio button at the top instead of the "Clone an Existing Site" radio button, and all the work you just did inputting your clone's new info is lost.

Can we make sure that your place and information is saved when an error is thrown? See attached screencast video. I thought this might also be the case for other kinds of errors, making it less of an edge case than the domain numbers example.


Files

site number error domain.png (31.7 KB) site number error domain.png Colin McDonald, 2025-02-06 12:43 PM
clone site error flow.mov (16.7 MB) clone site error flow.mov Colin McDonald, 2025-02-06 12:43 PM
Actions #1

Updated by Boone Gorges 8 months ago

  • Assignee changed from Boone Gorges to Jeremy Felt
  • Target version set to 2.6.0

Jeremy, could you please have a look? The text change is minor. The more complex bit is prefilling form fields in case of a failed submission. I figured maybe you'd be best to look at this, since you built a good bit of this cloning interface.

Actions #2

Updated by Jeremy Felt about 1 month ago

As I started digging into this, I had another thought... why not allow numeric domain names?

The current restriction (I believe) is most important in a subdirectory multisite configuration. (e.g. something like 2025 conflicting with a date-based archive on the main site). There shouldn't be any restriction in DNS or elsewhere in WordPress that prevents numeric domains.

So, question for the group: should we allow fully numeric subdomains?

(And whether or not we change that, there are also other "site name" error messages that we can adjust to reflect "domain")

Actions #3

Updated by Colin McDonald about 1 month ago

If it's just an issue of lifting the numeric ban, and it doesn't take more resources, I don't see why we should prevent the numeric subdomains. It's an edge case for sure, though.

Jeremy, let me know if I can help adjust the other "site name" error messages that you mention. I'm not sure what all of the defaults are right now.

Actions #4

Updated by Jeremy Felt about 1 month ago

Here are instances where "site name" may be shown as part of the error. I think we can replace each with "subdomain".

  • "Please enter a site name", when no subdomain has been entered
  • "Site names can only contain lowercase letters (a-z) and numbers." when a subdomain has non-alphanumeric characters.
  • "That name is not allowed." when a subdomain matches the list of "illegal" names.
  • "Site name must be at least 4 characters." when a subdomain has fewer than 4 characters.
  • "Sorry, site names must have letters too!" when the subdomain is numeric only.

And I think Boone has solved the other part of this ticket in the new batched cloning interface. The error now appears at the bottom and the entire form is not wiped out.

Actions #5

Updated by Colin McDonald about 1 month ago

Thanks Jeremy, and that looks good to be about all of the "site name" for "subdomain" substitutions. Let's move ahead with that when you can.

Actions #6

Updated by Jeremy Felt about 1 month ago

I've updated the error messages that reference site name to use subdomain instead in https://github.com/cuny-academic-commons/cac/commit/82545f117a3559cbc569e17a7739b6849cd35112

Actions

Also available in: Atom PDF