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

Recently accessed items block instances after upgrade have incorrect parent context ID

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 4.0
    • 4.0
    • Blocks

      To reproduce:

      1. Check out a patch before MDL-72092 has landed:

        git checkout 47e880e347ccb2c216d72f803ff6154820695bf0

      2. Open the block_instances table.
      3. Log in as an admin and go to the Dashboard and then check the block_instances table. You'll see block instances for that admin's user context ID.
      4. Log in as another user and go to the Dashboard. Checking on the block_instances, you'll see the records for the user's context ID.
      5. Check out the recent version where MDL-74271 has been included.
      6. Run the upgrade
      7. You'll see three "recentlyaccesseditems" records but their parentcontextid is set to 1 (system). Two of these (the one for the admin and the user) should have the parentcontextid set to the admin's and user's user context ID, respectively.
      8. Go to Site administration / Apperance / Default dashboard page.
      9. Reset the Dashboard for all users.
      10. You'll see the three "recentlyaccesseditems" records on the block_instances. The admin's and the user's block instance records are deleted.
      11. As admin, view the Dashboard again and check the block_instances table.
      12. You'll see that the new block instance records for the admin's context ID are created. Same will happen for the user. The extra recentlyaccesseditems block instance records are now orphaned.

            dobedobedoh Andrew Lyons
            jpataleta Jun Pataleta
            Adrian Greeve Adrian Greeve
            Jun Pataleta Jun Pataleta
            CiBoT CiBoT
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 day, 1 hour, 31 minutes
                1d 1h 31m

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.