Opened 8 years ago
Closed 7 years ago
#44575 closed defect (bug) (duplicate)
Network administrators are allowed to register sites with hyphens, but wpmu_validate_blog_signup disallows hyphens
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | Priority: | normal | |
| Severity: | normal | Version: | 3.0 |
| Component: | Networks and Sites | Keywords: | needs-patch |
| Focuses: | multisite | Cc: |
Description
As a network administrator, I can register a site with a hyphen in the URL from /wp-admin/network/site-new.php (see here: https://github.com/WordPress/WordPress/blob/master/wp-admin/network/site-new.php#L237). The guide text says:
Only lowercase letters (a-z), numbers, and hyphens are allowed.
However, as a user on wp-signup.php, I can only use lowercase letters and numbers and this is enforced by wpmu_validate_blog_signup() (see here: https://github.com/WordPress/WordPress/blob/master/wp-admin/network/site-new.php#L237). The error message says:
Site names can only contain lowercase letters (a-z) and numbers.
Is there a reason for this discrepancy? As a network admin, it means that I have different URL options depending on where I register a site, which is counterintuitive. Ideally the same URL options would be available for site registration wherever it happens.
Attachments (1)
Change History (4)
#3
@
7 years ago
- Milestone Awaiting Review deleted
- Resolution set to duplicate
- Status changed from new to closed
- Version changed from 4.9.7 to 3.0
Hi @greatislander, thanks for the ticket! Sorry for coming through so late. This appears to be a duplicate of #20019. I'm going to close this ticket so that we can focus on a solution there.
Is there a reason for this discrepancy?
My hunch is that it is related to how signups were originally handled in b2++. The username (also site) that someone signed up with would translate to the DB table prefix for that site: b2_jeremyfelt_posts, etc... so only a limited set of characters were allowed.
I like to have - (also because is the same way the post are created), it help to understand if we have a site name created by two different names or more, like:
/site-test/
/tolkien-russian/
/spanish-begginer-vocabulary/