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

Blog associations are never removed from the database

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.3, 2.3.1
    • Fix Version/s: 2.2.5, 2.3.2
    • Component/s: Blog
    • Labels:
    • Testing Instructions:
      Hide

      Before testing
      It would be ideal to have access to the database tables so that you can confirm that the entries have been deleted.

      Testing Steps

      1. Go to [Settings ► Site administration ► Appearance ► Blog] and 'Enable blog associations'
      2. Go to a course or create on if you don't have one.
      3. Add the Blog Menu block.
      4. 'Add an entry about this course' (Fill out the form details). Save changes.
      5. Check the database (mdl_blog_association). You should have an entry in this table.
      6. Delete the blog entry.
      7. Re-check the database table. The entry should be deleted.
      Show
      Before testing It would be ideal to have access to the database tables so that you can confirm that the entries have been deleted. Testing Steps Go to [Settings ► Site administration ► Appearance ► Blog] and 'Enable blog associations' Go to a course or create on if you don't have one. Add the Blog Menu block. 'Add an entry about this course' (Fill out the form details). Save changes. Check the database (mdl_blog_association). You should have an entry in this table. Delete the blog entry. Re-check the database table. The entry should be deleted.
    • Affected Branches:
      MOODLE_23_STABLE
    • Fixed Branches:
      MOODLE_22_STABLE, MOODLE_23_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      wip-MDL-34318-master

      Description

      When a blog entry that is associated with a module or a course is removed, the blog association is not removed from the database.

      Replication steps:

      1. Create a new blog entry that is associated with a course or a module. (See http://docs.moodle.org/19/en/Blogs_2.0#Blog_associations on how to create associated blog entries.)
      2. The entry will be saved in the database table [db prefix]_post, the association will be saved in the table [db prefix]_blog_association, note the last entry in the post table and the blog_association table, this is where your entry and it's association are saved.
      3. Remove your newly created entry.
      4. Take a new look at [db prefix]_post and [db prefix]_blog_association, the last entry in blog_association will remain, although the entry in the post table is removed.

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            salvetore Michael de Raadt added a comment -

            Thanks for spotting that and providing a solution.

            Show
            salvetore Michael de Raadt added a comment - Thanks for spotting that and providing a solution.
            Hide
            ankit_frenz Ankit Agarwal added a comment -

            Looks good Adrian!
            +1 for integration

            Thanks

            Show
            ankit_frenz Ankit Agarwal added a comment - Looks good Adrian! +1 for integration Thanks
            Hide
            abgreeve Adrian Greeve added a comment - - edited

            Thanks for the review Ankit.

            Submitting for integration.

            Dear Integrator,

            Please pull out of integration if I haven't included some code to clean up any orphaned blog associations.

            Show
            abgreeve Adrian Greeve added a comment - - edited Thanks for the review Ankit. Submitting for integration. Dear Integrator, Please pull out of integration if I haven't included some code to clean up any orphaned blog associations.
            Hide
            stronk7 Eloy Lafuente (stronk7) added a comment -

            The main moodle.git repository has just been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week.

            TIA and ciao

            Show
            stronk7 Eloy Lafuente (stronk7) added a comment - The main moodle.git repository has just been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week. TIA and ciao
            Hide
            samhemelryk Sam Hemelryk added a comment -

            Thanks Adrian, this has been integrated now.

            Show
            samhemelryk Sam Hemelryk added a comment - Thanks Adrian, this has been integrated now.
            Hide
            fred Frédéric Massart added a comment -

            Test passed. \o/

            Show
            fred Frédéric Massart added a comment - Test passed. \o/
            Hide
            stronk7 Eloy Lafuente (stronk7) added a comment -

            Many thanks for the hard work.

            These changes have been spread upstream and are already available in the git and cvs repositories.

            Ciao

            Show
            stronk7 Eloy Lafuente (stronk7) added a comment - Many thanks for the hard work. These changes have been spread upstream and are already available in the git and cvs repositories. Ciao

              People

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

                Dates

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