Skip to content

[Core] Updating an URL alias does not regenerate the url path #279

@boazpoolman

Description

@boazpoolman

Bug report

Describe the bug

Say you have a URL alias for a page which has Generate automatic URL alias set to false. So you have overwritten the URL with a custom path, not generated by a pattern.
If you now update that URL alias to set generated to true, it doesn't automatically update the path the be generated. Instead the old custom URL will still be present in the database.
Only when you update the corresponding page is the URL alias updated.

Steps to reproduce the behavior

  1. Setup your Strapi application
  2. Install the Webtools plugin
  3. Create a content type "Article"
  4. Enable Webtools for this content type
  5. Create an Article and save it
  6. Now click the "Edit URL alias" button
  7. Uncheck the "Generate automatic URL alias"
  8. Put in a custom URL, something like /this-is-a-custom-url
  9. Save the alias
  10. Again click the "Edit URL alias" button
  11. Now check the "Generate automatic URL alias" checkbox
  12. Save the alias
  13. See the issue in the DB where the path of the alias is still /this-is-a-custom-url

Expected behavior

The URL alias should regenerate it's path directly when the generated status changes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions