Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-56998

Associated blog posts are not removed when module is deleted

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.1.3, 3.2, 3.4, 3.5
    • Fix Version/s: 3.4.5, 3.5.2
    • Component/s: Blog
    • Labels:
    • Testing Instructions:
      Hide

      Test 1 (Test removal of blog associations on upgrade)

      **Before running the upgrade to the latest release:

      1. Create a Course.
      2. In the Course, turn editing on.
      3. Create an activity in the Course (ex. Assignment).
      4. Go to the created Assignment activity.
      5. Add a 'Blog menu' block in the Assignment.
      6. In the 'Blog menu' block, click on the link 'Add an entry about this Assignment'.
        • Add a blog entry and add a related Tag.
        • Save changes
      7. Go back to the Course.
      8. Delete the Assignment. (also run php admin/cli/cron.php).
      9. Go to Tags (your_moodle_instance/tag/search.php).
        • The Tag associated to the Assignment blog should still be present.
      10. Make sure the associated blog posts are still present in the DB.
      11. **Upgrade your instance to the latest release.
      12. After the upgrade:
        • The Tag associated to the Assignment blog should NOT be present.
        • Make sure the associated blog posts are removed from the DB.

      Test 2.

      After upgrading to the latest release:

      1. Log in as Admin.
      2. Create a Course.
      3. In the Course, turn editing on.
      4. Create an activity in the Course (ex. Assignment).
      5. Go to the created Assignment activity.
      6. Add a 'Blog menu' block in the Assignment.
      7. In the 'Blog menu' block, click on the link 'Add an entry about this Assignment'.
        • Add a blog entry and add a related Tag.
        • Save changes
      8. Go back to the Course.
      9. Delete the Assignment. (also run php admin/cli/cron.php).
      10. Go to Tags (your_moodle_instance/tag/search.php).
        • The Tag associated to the Assignment blog should NOT be present.
      11. Make sure the associated blog posts are removed from the DB.
      Show
      Test 1 (Test removal of blog associations on upgrade) **Before running the upgrade to the latest release: Create a Course. In the Course, turn editing on. Create an activity in the Course (ex. Assignment). Go to the created Assignment activity. Add a 'Blog menu' block in the Assignment. In the 'Blog menu' block, click on the link 'Add an entry about this Assignment'. Add a blog entry and add a related Tag. Save changes Go back to the Course. Delete the Assignment. (also run  php admin/cli/cron.php ). Go to Tags (your_moodle_instance/tag/search.php). The Tag associated to the Assignment blog should still be present. Make sure the associated blog posts are still present in the DB. **Upgrade your instance to the latest release. After the upgrade: The Tag associated to the Assignment blog should NOT be present. Make sure the associated blog posts are removed from the DB. Test 2 . After upgrading to the latest release: Log in as Admin. Create a Course. In the Course, turn editing on. Create an activity in the Course (ex. Assignment). Go to the created Assignment activity. Add a 'Blog menu' block in the Assignment. In the 'Blog menu' block, click on the link 'Add an entry about this Assignment'. Add a blog entry and add a related Tag. Save changes Go back to the Course. Delete the Assignment. (also run php admin/cli/cron.php ). Go to Tags (your_moodle_instance/tag/search.php). The Tag associated to the Assignment blog should NOT be present. Make sure the associated blog posts are removed from the DB.
    • Affected Branches:
      MOODLE_31_STABLE, MOODLE_32_STABLE, MOODLE_34_STABLE, MOODLE_35_STABLE
    • Fixed Branches:
      MOODLE_34_STABLE, MOODLE_35_STABLE
    • Pull 3.5 Branch:
    • Pull Master Branch:
      MDL-56998-master

      Description

      Steps to reproduce:

      1. I've created an activity and a blog post associated with it, I've added some tags to that blog post
      2. I deleted the activity (in case of 3.2 I deleted and ran async deletion scheduled task)
      3. I went to Site pages > Tags
      4. The tags are still there, when I click on them I can see blog posts
      5. when I click on the blog post I get the first of the errors that context is not found

        Attachments

        1. image-2018-09-05-16-11-22-523.png
          51 kB
          Janelle Barcega
        2. image-2018-09-05-16-11-22-916.png
          100 kB
          Janelle Barcega

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  10/Sep/18

                  Time Tracking

                  Estimated:
                  Original Estimate - 0 minutes
                  0m
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 hour
                  1h