I am trying out yiibehaviorsluggable and posted some question to the creator. Hopefully I can get some help from here too if any of you are using the same ext :
Question 1
duplicate entry
Hi mintao, thanks for extension
but can you make it detect duplicate slugs?
currently if I create 2 articles with the same title ("Test Slug") it will generate 2 slugs respectively ("test-slug" and "test-slug-1")
when I edit the artice of "test-slug-1" and change it to "test-slug" it will be accepted and thus there will be 2 "test-slug" in the db
I want to make the Slug field editable in case the user wants to customize it.
how is this handled?
Question 2
count number not consistent
and the count suffix added to the slug is not quite consistent
I created a few articles of the same title and edit the slug fields randomly by removing the "-1" or "-2"… and deleting some articles and add again…
the slugs generated sometimes shows duplicate slugs like
1 "test-slugs"
2 "test-slugs"
3 "test-slugs-2"
or
1 "test-slugs"
2 "test-slugs-2-1"
It doesn’t checks the rows properly or assign the right numbers although it will work well with 1 or or 2 records without much editing…
I am new to slug thing…is this how it is meant to be? or do you have plans to further update this extension?