You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When Gutenberg is enabled I am seeing an issue where the post slug field is not saved, specifically it is cleared out entirely, when a post is saved with a custom status. I have traced done this issue to this code - https://github.com/Automattic/Edit-Flow/blob/0.9/modules/custom-status/custom-status.php#L1395-L1431. It appears that since the $_POST['post_name'] element is not set when editing a post in Gutenberg, the function always thinks the user did not set a custom slug, and therefore it clears the post slug.
I have done some rough testing and I believe this logic can be removed entirely since the custom post status API has been updated over the years to better support custom post slugs.
The text was updated successfully, but these errors were encountered:
@kjbenk thanks for reporting this. I think #575 should fix it, and I've added enough testing to hopefully catch most of the corner cases.
When I removed that entire function (fix_post_name), the post_name was getting permanently set (which prevented the slug from updating if the user had not intentionally set it). If you can take a look at that PR, that'd be fantastic, could use a few more eyes
When Gutenberg is enabled I am seeing an issue where the post slug field is not saved, specifically it is cleared out entirely, when a post is saved with a custom status. I have traced done this issue to this code - https://github.com/Automattic/Edit-Flow/blob/0.9/modules/custom-status/custom-status.php#L1395-L1431. It appears that since the
$_POST['post_name']
element is not set when editing a post in Gutenberg, the function always thinks the user did not set a custom slug, and therefore it clears the post slug.I have done some rough testing and I believe this logic can be removed entirely since the custom post status API has been updated over the years to better support custom post slugs.
The text was updated successfully, but these errors were encountered: