Bug: Restoring a trashed draft still contains “__trashed” in the slug field
Expected behavior
The slug should be changed to the empty string when it is trashed as empty and restored.
Actual behavior
Slug text remains “__trashed” after restoring.
Steps to reproduce the behavior
- Create a new post and save it as a draft
- Trash post
- Restore post
- Check for the slug
Tested on [device], iOS [version], WPiOS [version]
iOS: iPhone 6, 12.4.7, WordPress 15.0.1
Same as wordpress-mobile/WordPress-Android#12359
I wasn't able to reproduce this issue using the steps provided. Here are the steps I used:
- Go to My Site > Create New button > Blog post.
- Add a title and publish the post.
- View the list of published posts.
- On the post I just created, select More > Move to Bin.
- Select "Move to Bin" in the confirmation dialog.
- Restore the post using either "Undo" (immediately after binning the post) or go to the Binned tab and select More > Move to Draft.
- Find the restored post and open it in the editor.
- Go to Post Settings and check the slug value.
In each case, the post slug matched the post title (no "__trashed" text appended). Am I missing something in the repro steps here?
Tested on iPhone XS, iOS 13.5.1, WPiOS 15.0.1 (device set to UK English, so my steps use "Bin" where US English should use "Trash").
Your steps look correct for reproducing. I made a screen recording about the issue on my phone. Can you check it, please?
Thanks for that recording! I see that in your case, you save the post as a draft (rather than publish it). When I repeat my steps but save the post as a draft at step 2, I can reproduce this behavior. I'll update the issue description to reflect that.
I wasn't aware of the difference for published vs draft post. Nice catch!
This is the case in Calypso as well: https://github.com/Automattic/wp-calypso/issues/32286