Plugin not working correctly with existing elements
Tiffoun opened this issue · 7 comments
Bug report
Describe the bug
The alias is not always saved with existing elements (I use strapi 4.6.0)
Steps to reproduce the behavior
Configure plugin for an existing collection, for exemple with: /[Title]
Edit content on an existing element of the collection.
Let the url generation on autogenerated
An url is generated (visible in the alises list) but using API the element is not found.
Return on the element, the input where the alias should be visible is empty.
Make change (but not in the title) and save.
A new alias is generated (title-0) but still not accessible via API (not found error)
When I fetch all elements of the collection the property url_path_id is null
When creating a new element the alias is saved correctly and accessible via url
Expected behavior
The element should always be accessible using its url
Thanks for submitting this issue. I'll try and reproduce it as soon as I can.
I'm having the same issue; I was able to fix it by manually going into the database and setting url_path_id
for each existing item, but I'm not sure why the admin panel was not able to set that up.
Related, it would be very helpful to have the ability to delete (or modify) url paths from the admin page! :)
Hi,
I had the same behavior, but I think it's only happening on content type entries you had before installing the plugin. ie :
- create content type article
- Add one article, "Hello World"
- Realise you didn't install the usual plugins, install url-alias
- Go back to Article "Hello World" -> can't get any alias to be saved, generate url but assiciation isn't made
- Create a new article -> This one works as intended.
I hope this will help reproducing the issue :)
@boazpoolman did the fix not work? Or why did you reopen this issue?
Yeah the fix works, though as it's not released just yet the issue is technically still present.
I'll close as soon as I've released.
This issue has been fixed, and released with version 1.0.0-beta.6.