WordPress-iOS icon indicating copy to clipboard operation
WordPress-iOS copied to clipboard

Bug: Restoring a trashed draft still contains “__trashed” in the slug field

Open ahmet-izgi opened this issue 5 years ago • 5 comments

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

  1. Create a new post and save it as a draft
  2. Trash post
  3. Restore post
  4. 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

ahmet-izgi avatar Jul 07 '20 17:07 ahmet-izgi

I wasn't able to reproduce this issue using the steps provided. Here are the steps I used:

  1. Go to My Site > Create New button > Blog post.
  2. Add a title and publish the post.
  3. View the list of published posts.
  4. On the post I just created, select More > Move to Bin.
  5. Select "Move to Bin" in the confirmation dialog.
  6. Restore the post using either "Undo" (immediately after binning the post) or go to the Binned tab and select More > Move to Draft.
  7. Find the restored post and open it in the editor.
  8. 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").

rachelmcr avatar Jul 08 '20 14:07 rachelmcr

Your steps look correct for reproducing. I made a screen recording about the issue on my phone. Can you check it, please?

ahmet-izgi avatar Jul 08 '20 15:07 ahmet-izgi

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.

rachelmcr avatar Jul 08 '20 15:07 rachelmcr

I wasn't aware of the difference for published vs draft post. Nice catch!

ahmet-izgi avatar Jul 08 '20 21:07 ahmet-izgi

This is the case in Calypso as well: https://github.com/Automattic/wp-calypso/issues/32286

thehenrybyrd avatar Apr 19 '22 07:04 thehenrybyrd