-
AuthorPosts
-
April 9, 2026 at 1:06 pm #1496706
Tim van den Hombergh
GuestHi Enfold Support Team,
I’d like to report an issue with the duplicate post functionality introduced in Enfold (class aviaDuplicatePost). We use the latest Enfold version 7.1.4 and WordPress 6.9.4
Description of the issue
When duplicating a post using the built-in “Duplicate” action, the system copies the original post’s slug (post_name) to the new draft. This leads to unexpected behavior:
The duplicated post receives the same slug as the original post.
WordPress then attempts to resolve the conflict.
As a result, the original post’s slug is modified (e.g. my-post becomes my-post-2), while the duplicate may take over the original slug.This is problematic because:
It silently changes live URLs.
It can break SEO rankings and existing links.
It creates confusion in content management.
Steps to reproduce
Create a published post with a defined slug (e.g. example-post).
Use the “Duplicate” action in the post list or editor.
Observe that:
The duplicate gets the same slug.
The original post slug may change unexpectedly.
Root causeThe issue appears to stem from explicitly setting the post_name when inserting the duplicated post:
‘post_name’ => $post->post_name,
By forcing the same slug, WordPress is required to resolve the conflict and may reassign slugs between posts.
Proposed solution
The post_name should not be copied when duplicating a post. Instead, WordPress should be allowed to generate a unique slug automatically.
Recommended change:
Remove the post_name argument from the $args array in handler_admin_action_avia_duplicate_post():
// Remove this line:
‘post_name’ => $post->post_name,This allows WordPress to:
Generate a slug based on the new title (e.g. “(copy)”)
Ensure uniqueness without modifying the original post
Expected behavior after fix
The original post slug remains unchanged.
The duplicated post receives a unique, auto-generated slug (e.g. example-post-copy).Please let me know if you need further details or testing. I’d be happy to assist.
Best regards,
Tim van den HomberghApril 11, 2026 at 2:01 pm #1496732Hey Tim van den Hombergh,
Thanks for your input, but I was not able to reproduce the original post slug changing.
I’m not sure why you are experiencing this, perhaps a plugin conflict, etc.
If you would like the Dev Team to review this proposed change, please open a Github Feature Request this will allow you to follow along as the Dev Team reviews the proposed change.Best regards,
Mike -
AuthorPosts
- You must be logged in to reply to this topic.
