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

JS error in some themes when admin block hidden

    Details

    • Testing Instructions:
      Hide

      Against at least the following themes:

      • clean
      • canvas
      • base
      1. Hide the administration block on the home page
      2. view the front page
        • Confirm that there were no JS errors in the console
      Show
      Against at least the following themes: clean canvas base Hide the administration block on the home page view the front page Confirm that there were no JS errors in the console
    • Affected Branches:
      MOODLE_26_STABLE
    • Fixed Branches:
      MOODLE_26_STABLE
    • Pull Master Branch:
      MDL-45096-master

      Description

      On some themes on MOODLE_26_STABLE, this code fails due to siteadminbranch.node being null, breaking all block configuration and other features.

      I placed the code that uses siteadminbranch.node in a block after testing presence of that property and all seemed to work fine.

        Gliffy Diagrams

          Attachments

            Activity

            Show
            mrclay Steve Clay added a comment - https://github.com/moodle/moodle/pull/89/files
            Hide
            dobedobedoh Andrew Nicols added a comment -

            Steve Clay, any chance you could give information on when the site admin branch is not available?

            Show
            dobedobedoh Andrew Nicols added a comment - Steve Clay , any chance you could give information on when the site admin branch is not available?
            Hide
            mrclay Steve Clay added a comment -

            We had set the administration block to hidden on the front page. On all other pages the admin block was visible and there was no problem.

            We experienced this error using the bootstrapbase theme and few others. I believe Arialist was one theme that did not show the error.

            Show
            mrclay Steve Clay added a comment - We had set the administration block to hidden on the front page. On all other pages the admin block was visible and there was no problem. We experienced this error using the bootstrapbase theme and few others. I believe Arialist was one theme that did not show the error.
            Hide
            dobedobedoh Andrew Nicols added a comment -

            Hi Steve Clay,

            The changes in your patch look good so I've pulled your patch and run it through shifter, adjusted the commit, and added it to this issue.

            Any chance of some testing instructions, and I'll get this sent for peer review and up to integration.

            Cheers,

            Andrew

            Show
            dobedobedoh Andrew Nicols added a comment - Hi Steve Clay , The changes in your patch look good so I've pulled your patch and run it through shifter, adjusted the commit, and added it to this issue. Any chance of some testing instructions, and I'll get this sent for peer review and up to integration. Cheers, Andrew
            Hide
            mrclay Steve Clay added a comment -

            Hide the administration block on the home page and view the home page using various themes (bootstrapbase was one of the broken ones). Without the patch you should get a JS error and none of the block configuration should work.

            Hope that helps.

            Show
            mrclay Steve Clay added a comment - Hide the administration block on the home page and view the home page using various themes (bootstrapbase was one of the broken ones). Without the patch you should get a JS error and none of the block configuration should work. Hope that helps.
            Hide
            cibot CiBoT added a comment -

            Results for MDL-45096

            • Remote repository: git://github.com/andrewnicols/moodle.git
            Show
            cibot CiBoT added a comment - Results for MDL-45096 Remote repository: git://github.com/andrewnicols/moodle.git Remote branch MDL-45096 -master to be integrated into upstream master Executed job http://integration.moodle.org/job/Precheck%20remote%20branch/3096 Details: http://integration.moodle.org/job/Precheck%20remote%20branch/3096/artifact/work/smurf.html
            Hide
            skodak Petr Skoda added a comment -

            +1, thanks everybody

            Show
            skodak Petr Skoda added a comment - +1, thanks everybody
            Hide
            samhemelryk Sam Hemelryk added a comment -

            Thanks guys this has been integrated now and cherry-picked to 26

            Show
            samhemelryk Sam Hemelryk added a comment - Thanks guys this has been integrated now and cherry-picked to 26
            Hide
            johno John Okely added a comment -

            Error no longer occurs. Testing passed

            Show
            johno John Okely added a comment - Error no longer occurs. Testing passed
            Hide
            poltawski Dan Poltawski added a comment -

            Thank you for your contributions reporting, testing, developing, peer reviewing, pinging and helping this issue to get fixed!

            It's now part of Moodle!

            We couldn't have done it without you!

            Show
            poltawski Dan Poltawski added a comment - Thank you for your contributions reporting, testing, developing, peer reviewing, pinging and helping this issue to get fixed! It's now part of Moodle! We couldn't have done it without you!

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  12/May/14