Unexpected behavior when deleting merged thread

Open
#8,117 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
php
Domain
web-dev

Research direction

Reproduce the problem in the discussion forum with “show merged threads” enabled, following the listed merge-and-delete steps. Use the resulting PHP errors and the changed thread display to trace the deletion state; done means deleting a thread also deletes its merged threads without errors in either display mode.

Written by the indexing model from the issue text.

Description

bug Discussion Forum / Live Chat

Describe the bug
Deleting a thread that has a merged thread located at the top of the list will produce unexpected behavior.

Expected behavior
Deleting a thread that has merged threads should also have merged threads deleted.

To Reproduce
Steps to reproduce the behavior:

  1. Go to the discussion forum and make sure the "show merged threads" option is enabled.
  2. Merge the thread located at the top of the list into the thread below, and delete this thread.
  3. There will be numerous PHP errors on the left of the screen, see the image below.
    image
    Notice that thread (9) is now deleted, but the merged thread (10)'s state is unclear.
  4. Turn off the "show merged threads" option will remove the errors, but the interface will be changed to the following.
    image
Dominant language
PHP
Stars
793
Forks
1.1k
Avg merge
2d 16h
Merged PRs (30d)
78

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Submitty/Submitty

All issues in Submitty/Submitty

Similar issues

More PHP issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.