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

__home__ slug gets rewritten to home on save #4096

Closed
nilsenpaul opened this issue Apr 4, 2019 · 1 comment
Closed

__home__ slug gets rewritten to home on save #4096

nilsenpaul opened this issue Apr 4, 2019 · 1 comment

Comments

@nilsenpaul
Copy link
Contributor

Description

If we want to define an entry as the site's homepage, we always set the slug to __home__. As of the last update, this gets automatically rewritten to home, which stops the homepage from being found.

Steps to reproduce

  1. Create an entry with slug __home__
  2. Save it, re-open it and see the slug changed to home

Additional info

The problem is solved in a very quick and dirty way, if I change line 42 in craftcms/cms/src/helpers/ElementHelper.php to:

if ($str !== '__home__') {
    $str = StringHelper::toKebabCase($str, $glue, $lower, false);
} 
  • Craft version: 3.1.21
@nilsenpaul nilsenpaul changed the title __home__ slug gets rewritten to home __home__ slug gets rewritten to home on save Apr 4, 2019
@brandonkelly
Copy link
Member

Sorry about that. Just released 3.1.21.1 which fixes this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants