Under certain circumstances the id is appended to an auto-generated alias, although it would be unique without it. This happens when:
a news item with the alias field left blank is saved, but the first attempt to save it results in an error
an existing news item is edited, the alias field is cleared, but the auto-generated alias would be the same as before
How to reproduce this in the online demo:
Create a new news item
Leave the alias field blank
Select no author (or do anything else that will trigger a form error)
Save
Correct the error
Save again
The news item's alias will now contain the id, even though it would have been unique without it.
As far as I can tell this is caused by the generateAlias method which only checks the number of the alias' occurencies. The case where the generated alias already exists, but actually belongs to the item for which it was generated is not handled.
Under certain circumstances the id is appended to an auto-generated alias, although it would be unique without it. This happens when:
How to reproduce this in the online demo:
As far as I can tell this is caused by the generateAlias method which only checks the number of the alias' occurencies. The case where the generated alias already exists, but actually belongs to the item for which it was generated is not handled.