wordpress-mobile / wordpress-mobile/WordPress-iOS
Comments Seemingly Disappear After Post is Restored from Trash
Nobody has claimed this yet.
- Dominant language
- Swift
- Stars
- 3.9k
- Forks
- 1.2k
- Avg merge
- 23h 51m
- Merged PRs (30d)
- 58
Description
Expected behavior
I expected the entirety of a post's content, including its comments, to be retained after restoring it from the trash folder.
Actual behavior
Comments seemingly disappear after restoring a post from the trash folder in either app. They're not viewable on their original post or in the admin's area's Comments section.
Steps to reproduce the behavior
- Navigate to My Site > Blog Posts and tap Trash alongside any post that has comments.
- Next, tap the Trashed filter in the app and choose the option to Move to Draft, you can then Publish the draft.
- View the post to verify that it no longer has any comments and also check the admin area's Comments section. You may need to clear the cache first. The comments won't appear in either the app or the web.
If I chose the Restore option immediately after trashing a post from either app, so that it was restored as a published post rather than a draft, then the comments were retained. I was also unable to replicate the above in Calypso, where there isn't an option to restore a trashed post as a draft. Move to Draft appears to be the key option causing issues here.
I wonder whether the underlying problem here could be related to this open GH report about comments being trashed if there are too many status changes in a short amount of time.
This was reported in p2EDhh-Zn-p2 and we're still working to try to get a user's comments restored. I note that the comments still appear for approval from their notifications, so have recommended approving directly from their notifications to get them restored for now.
Tested on iPad Mini, iOS 12.3.1., WPiOS 13.7
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the flow in the iOS app through My Site > Blog Posts > Trash, comparing Move to Draft with immediate Restore. Verify whether comments remain visible on the restored post and in the admin Comments section, and compare the behavior with Calypso; the issue names no source file or test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- swift
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100