Details

    • Type: Sub-task Sub-task
    • Status: Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: 1.9, 2.3
    • Fix Version/s: DEV backlog
    • Component/s: Forum
    • Labels:
    • Testing Instructions:
      Hide

      Note that to test this properly you need a database with some orphaned posts. Follow these steps with a 2.3 instance without this fix applied.

      1. Revert MDL-31664.
      2. Create a forum.
      3. Create a discussion (post A) as a user.
      4. Post a reply (post B) as another user.
      5. Post another reply (post C) to Post B.
      6. Post a separate reply (post D) to Post A.
      7. Delete Post B.
      8. Verify that Post C and Post D are still in the database.

      Now apply this fix to upgrade mod/forum. Run the upgrade. Post C should be deleted from the database. Posts A and D should still be there.

      Show
      Note that to test this properly you need a database with some orphaned posts. Follow these steps with a 2.3 instance without this fix applied. 1. Revert MDL-31664 . 2. Create a forum. 3. Create a discussion (post A) as a user. 4. Post a reply (post B) as another user. 5. Post another reply (post C) to Post B. 6. Post a separate reply (post D) to Post A. 7. Delete Post B. 8. Verify that Post C and Post D are still in the database. Now apply this fix to upgrade mod/forum. Run the upgrade. Post C should be deleted from the database. Posts A and D should still be there.
    • Affected Branches:
      MOODLE_19_STABLE, MOODLE_23_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-13516-master
    • Rank:
      327

      Description

      posts without parents

        Issue Links

          Activity

          Hide
          Petr Škoda added a comment -

          reassigning to HQ

          Show
          Petr Škoda added a comment - reassigning to HQ
          Hide
          Petr Škoda added a comment -

          This should be done in forum/db/upgrade.php, it might be enough to do it in master only because sooner or later everybody will upgrade...

          Show
          Petr Škoda added a comment - This should be done in forum/db/upgrade.php, it might be enough to do it in master only because sooner or later everybody will upgrade...
          Hide
          Petr Škoda added a comment -

          hi, I think the patch is not going to perform well:

          • NOT IN should be probably replaced by LEFT JOIN with NULL condition
          • it might hit memory problems or query limits (oracle), I would recommend using recordsets
          • who is going to delete attachments and embedded images?
          Show
          Petr Škoda added a comment - hi, I think the patch is not going to perform well: NOT IN should be probably replaced by LEFT JOIN with NULL condition it might hit memory problems or query limits (oracle), I would recommend using recordsets who is going to delete attachments and embedded images?
          Hide
          Ankit Agarwal added a comment -

          assigning to petr as the reviewer
          Thanks

          Show
          Ankit Agarwal added a comment - assigning to petr as the reviewer Thanks
          Hide
          Petr Škoda added a comment -

          oh, I missed this one, +1

          Show
          Petr Škoda added a comment - oh, I missed this one, +1

            People

            • Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: