I need an answer to this question on the symphony forum : http://forum.symfony-project.org/viewtopic.php?f=22&t=37411&p=124258
Could you provide a little more details? Have you changed anything in the default logic for the Sluggable behavior?
No change made about Sluggable behavior.
Have you tried adding
unique: false as an option to the Sluggable behavior?
Sorry. I have to use slug as a unique data.
obviously you are not supposed to play with slugs like that,
"When i create two article object with that same title (e.g. 'sale'), i have in my DB records with sale, sale-1 slugs." The slugs are different for the objects you created, you are creating the objects with same title but not assigning the same slugs.
"When i update object title to other (e.g. 'test'), everything goes fine. But when i change 'test' title to 'sale' back, i receive error:"
obviously unreasonable, you should not manually edit slugs like that to make them collide, or you should use a proper constraint validator to avoid for such a clash, if you are trying to purposefully make it
CODE: SELECT ALL
SQLSTATE: Integrity constraint violation: 1062 Duplicate entry 'sale-1-lt' for key 'article_translation_sluggable_idx'
I don't modify slug by myself. Doctrine do it for me.
of course but you tell it in code
show your code
Do you want to see the code of my form ?
yes, you should post it to github or something, my skype is cordova_luis
have you tried what Benjamin said below?
there is a known bug when using both i18n and sluggable.
you need to copy the file lib/vendor/symfony/lib/plugins/sfDoctrinePlugin/lib/vendor/doctrine/Doctrine/Template/Listener/Sluggable.php inside your own lib directory.
the you must edit the file following that instructions http://www.doctrine-project.org/jira/browse/DC-728