Identical Permalinks for Different Attachments
|Reported by:||filosofo||Owned by:|
|Component:||Administration||Keywords:||post_name bg|has-patch attachment permalink|
If you upload 2 different attachments in one post, give them the same title, and send them to the editor "linked to page," then both will end up with the same permalink for their "pages."
It happens because wp_insert_attachment() doesn't check to see if the post_name already exists.
My patch increments the post_name similarly to the way in which a regular post's post_name increments when it has a duplicate.