Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Slugs: numeric URLs are not allowed #28662

Closed
aristath opened this issue Feb 2, 2021 · 1 comment
Closed

Slugs: numeric URLs are not allowed #28662

aristath opened this issue Feb 2, 2021 · 1 comment
Labels
[Feature] Themes Questions or issues with incorporating or styling blocks in a theme. [Type] Bug An existing feature does not function as intended

Comments

@aristath
Copy link
Member

aristath commented Feb 2, 2021

Description

While trying to create a 404 template in an FSE theme from the dashboard I came across an interesting issue:
If I use 404 as the title, the slug became custom_slug_60194c2e24403.
When trying to change the slug to any numeric value I get an error: Updating failed. Invalid parameter(s): slug
Apparently numeric values are not allowed for slugs. Changing it to 404a works, any random number doesn't.

Step-by-step reproduction instructions

  • Using an FSE theme try to create a 404 template from Appearance -> Templates.

If I try this on a post (using postname as permalink structure) and use 8888888888 as slug, it changes to 8888888888-2 which is acceptable since it adds the dash.

WordPress information

  • WordPress version: 5.6.
  • Gutenberg version: 9.9
  • Are all plugins except Gutenberg deactivated? Yes
  • Are you using a default theme Doesn't matter, any FSE theme will do.

Device information

  • Device: Desktop
  • Operating system: Ubuntu
  • Browser: Firefox
@aristath aristath added the [Type] Bug An existing feature does not function as intended label Feb 2, 2021
@gziolo gziolo added [Feature] Full Site Editing [Feature] Themes Questions or issues with incorporating or styling blocks in a theme. labels Feb 3, 2021
@Mamaduka
Copy link
Member

Mamaduka commented May 1, 2022

This should be fixed now. See #37579.

@Mamaduka Mamaduka closed this as completed May 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Themes Questions or issues with incorporating or styling blocks in a theme. [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

No branches or pull requests

3 participants