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

Upgrade 3.10 -> 4.0.1+ Undefined property: stdClass::$enableaccessibilitytools in ... block_accessreview.php on line 176

    XMLWordPrintable

Details

    • Bug
    • Status: Waiting for peer review
    • Minor
    • Resolution: Unresolved
    • 4.0.1
    • None
    • Accessibility toolkit
    • MOODLE_400_STABLE
    • MDL-74755-400
    • MDL-74755-401
    • Hide
      1. Log in as admin
      2. Navigate to Advanced features in site administration
      3. Disable (uncheck) Enable accessibility tools and save changes
      4. Navigate to site home
      5. Turn editing on
      6. Press Add a block
      7. Confirm that Accessibility review is not present in the Add a block dialogue
      8. Navigate back to Advanced features
      9. Enable (check) Enable accessibility tools and save changes
      10. Navigate back to site home
      11. Press _Add a block
      12. Confirm that Accessibility review is present in the Add a block dialogue
      13. Manually edit site config.php, add the following:

        $CFG->enableaccessibilitytools = null;
        

      14. Navigate to site home
      15. Turn editing on
      16. Press Add a block
      17. Confirm that Accessibility review is not present in the Add a block dialogue, and no exception is thrown
      Show
      Log in as admin Navigate to Advanced features in site administration Disable (uncheck) Enable accessibility tools and save changes Navigate to site home Turn editing on Press Add a block Confirm that Accessibility review is not present in the Add a block dialogue Navigate back to Advanced features Enable (check) Enable accessibility tools and save changes Navigate back to site home Press _Add a block Confirm that Accessibility review is present in the Add a block dialogue Manually edit site config.php , add the following: $CFG->enableaccessibilitytools = null; Navigate to site home Turn editing on Press Add a block Confirm that Accessibility review is not present in the Add a block dialogue, and no exception is thrown

    Description

      Hello,

      I upgraded from Moodle 3.10 to 4.0.1+

      I got errors in the website-adminstration:

      Undefined property: stdClass::$enableaccessibilitytools in D:\Inetpub\....\blocks\accessreview\block_accessreview.php on line 176

      generalexceptionmessage
      Exception - Return value of block_accessreview::can_block_be_added() must be of the type bool, null returned
      File: ...view/block_accessreview.php
      Line: 176
      Stack trace:
       
      Error code: generalexceptionmessage
      * line 176 of /blocks/accessreview/block_accessreview.php: TypeError thrown
      * line 228 of /lib/blocklib.php: call to block_accessreview->can_block_be_added()
      * line 97 of /blocks/classes/external/fetch_addable_blocks.php: call to block_manager->get_addable_blocks()
      * line 261 of /lib/externallib.php: call to core_block\external\fetch_addable_blocks::execute()
      * line 81 of /lib/ajax/service.php: call to external_api::call_external_function()
       
      Error code: generalexceptionmessage
      * line 176 of /blocks/accessreview/block_accessreview.php: TypeError thrown
      * line 228 of /lib/blocklib.php: call to block_accessreview->can_block_be_added()
      * line 97 of /blocks/classes/external/fetch_addable_blocks.php: call to block_manager->get_addable_blocks()
      * line 261 of /lib/externallib.php: call to core_block\external\fetch_addable_blocks::execute()
      * line 81 of /lib/ajax/service.php: call to external_api::call_external_function()
      

      The plugin "accessibilitytools" was not enabled automatically during the upgrade.

      Solution:

      I could solve the problem by activating accessibilitytools at website-administration --> advanced features --> activated the checkbox for accessibilitytools

      Afterwards the problem was solved but it took quite a while to figure out the cause.

      Environment:

      OS: Windows 2016 + IIS + PHP 7,4,29 (64 Bit)

      Desired behaviour:

      The extension should be activated automatically during upgrade or moodle should run with deactivated accessibilitytools.

       

       

      Attachments

        Activity

          People

            pholden Paul Holden
            Thomas_H Thomas
            Mike Churchward, Karen Holland
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:

              Time Tracking

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 35 minutes
                35m