Deleting Parent comment makes children comments "unreplyable" and not editable
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 1.4k
- Forks
- 354
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 43
Description
How to use GitHub
- Please use the 👍 reaction to show that you are affected by the same issue.
- Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
- Subscribe to receive notifications on status change and new comments.
Describe the bug
Not sure if this a bug or by design constraint: When a comment B is a reply to a comment A, and comment A is deleted, it becomes impossible to reply to comment B. When you try, you get this error.
The response is
{
"ocs": {
"meta": {
"status": "failure",
"statuscode": 404,
"message": "Could not create comment."
},
"data": []
}
}
This seems true for any comment "downstream" a reply chain of a deleted comment. If 1<-2<-3<-4<-5 (meaning 2 is a reply to 1, 3 to 2 etc.), if one deletes comment 3, one can still reply to comment 1 and 2, but not to 4 and 5.
To Reproduce
Steps to reproduce the behavior:
- Go to the comment section of a card
- Create a comment A
- Create a comment B as a reply to A
- Delete comment A
- Try replying to comment B will cause an error
Further the orphan comments become readonly - when one tries to update them, one receives
{
"ocs": {
"meta": {
"status": "failure",
"statuscode": 403,
"message": "Permission denied."
},
"data": []
}
}
Expected behavior
If this is a design constraint, then it would be nice to have some flag that marks broken comments as "orphans" such that the UI can stop offering the option to reply in the first place. The current UX is that simply nothing happens.
Otherwise I would expect comments to remain "replyable" and editable, even when their parent is deleted.
I am willing to dig into that and work on a PR in case there is something to be done :).
Nextcloud version: (see Nextcloud admin page)
confirmed on 26, 30, 31
Signing status:
Login as admin user into your Nextcloud and access
http://example.com/index.php/settings/integrity/failed
paste the results here.
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
Start by reproducing the issue in the comment section of a card using the A→B→C reply chain described in the report. Check both the reply and edit behavior after deleting a parent, then ensure the finished behavior either keeps orphan comments replyable and editable or clearly marks them as unavailable in the UI.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- full-stack
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100