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

Boost related block changes cause errors in behat

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: 3.2
    • Fix Version/s: 3.2.1
    • Component/s: Blocks
    • Labels:
    • Testing Instructions:
      Hide
      1. Go to dashboard page.
      2. Switch between boost and clean themes several times. You should see navigation block in clean and not in boost (if you see the nav block in boost you may have added it manually or have old block instances in your from the dev branch - in this case delete the navigation block in boost until you see no nav block in boost and you do see a nav block in clean).
      3. Modify theme/clean/layout/columns3.php - add this code at the top:

        $PAGE->blocks->is_block_present('navigation');                                                                                      
        die();
        

      View the page again in clean with debugging enabled. You should see a blank page with no debugging.

      Show
      Go to dashboard page. Switch between boost and clean themes several times. You should see navigation block in clean and not in boost (if you see the nav block in boost you may have added it manually or have old block instances in your from the dev branch - in this case delete the navigation block in boost until you see no nav block in boost and you do see a nav block in clean). Modify theme/clean/layout/columns3.php - add this code at the top: $PAGE->blocks->is_block_present('navigation'); die(); View the page again in clean with debugging enabled. You should see a blank page with no debugging.
    • Workaround:
      Hide

      Not needed.

      Show
      Not needed.
    • Affected Branches:
      MOODLE_32_STABLE
    • Fixed Branches:
      MOODLE_32_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-57386-master

      Description

      I think MDL-56902 may have introduced a bug, in lib/blocklib.php, line 257:

      https://github.com/moodle/moodle/blob/master/lib/blocklib.php#L257

      Should $block->name be $blockname?

      I found this error while trying to run Behat tests in a custom theme, with the new feature in 3.2 that allows core features to be tested in themes other than Clean.

      I'm not sure if it affects anything else.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  9/Jan/17