Moodle
  1. Moodle
  2. MDL-30392

Unable to uninstall section_links block

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0.5, 2.1.2, 2.2
    • Fix Version/s: 2.0.6, 2.1.3
    • Component/s: Blocks
    • Labels:
    • Testing Instructions:
      Hide
      • Go to Admin->Plugins->Manage blocks
      • Delete (uninstall) the section_links block
      • TEST: No error happen and you get the message saying that it has been deleted and now needs to be deleted from disk.
      Show
      Go to Admin->Plugins->Manage blocks Delete (uninstall) the section_links block TEST: No error happen and you get the message saying that it has been deleted and now needs to be deleted from disk.
    • Difficulty:
      Easy
    • Affected Branches:
      MOODLE_20_STABLE, MOODLE_21_STABLE, MOODLE_22_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE, MOODLE_21_STABLE
    • Pull from Repository:
    • Pull Master Branch:
    • Rank:
      33012

      Description

      Apart from any other consideration (I could make a bunch related to that block, grrr), I was testing MDL-30327, and when uninstalling the block I got:

      Debug info: Argument 2 passed to moodle_database::delete_records()
      must be an array, string given, called in blocks/section_links/block_section_links.php
      on line 158 and defined
      Stack trace:
      line 365 of /lib/setuplib.php: coding_exception thrown
      line 1609 of /lib/dml/moodle_database.php: call to default_error_handler()
      line 158 of /blocks/section_links/block_section_links.php: call to moodle_database->delete_records()
      line 255 of /lib/adminlib.php: call to block_section_links->before_delete()
      line 101 of /admin/blocks.php: call to uninstall_plugin()
      

      Going to fix it now, it's only a matter of M2 API not being used.

        Issue Links

          Activity

          Hide
          Eloy Lafuente (stronk7) added a comment -

          Sending to integration

          Show
          Eloy Lafuente (stronk7) added a comment - Sending to integration
          Hide
          Eloy Lafuente (stronk7) added a comment -

          The fix is trivial, just in 2.2 I've added one TODO about the need to move that to proper component names and use the config API properly.

          Ciao

          Show
          Eloy Lafuente (stronk7) added a comment - The fix is trivial, just in 2.2 I've added one TODO about the need to move that to proper component names and use the config API properly. Ciao
          Hide
          Sam Hemelryk added a comment -

          Thanks Eloy this has been integrated now

          Show
          Sam Hemelryk added a comment - Thanks Eloy this has been integrated now
          Hide
          Sam Hemelryk added a comment -

          Passing thanks Eloy

          Show
          Sam Hemelryk added a comment - Passing thanks Eloy
          Hide
          Eloy Lafuente (stronk7) added a comment -

          Closing as fixed, many thanks for your effort!

          Note that the changes related to master (2.2beta) have been already sent upstream. But the stable ones will be part of next weeklies (Wed/Thu) as usual.

          Ciao

          Show
          Eloy Lafuente (stronk7) added a comment - Closing as fixed, many thanks for your effort! Note that the changes related to master (2.2beta) have been already sent upstream. But the stable ones will be part of next weeklies (Wed/Thu) as usual. Ciao

            People

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

              Dates

              • Created:
                Updated:
                Resolved: