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

Child themes no longer have base layouts loaded

    XMLWordPrintable

Details

    • MOODLE_37_STABLE
    • MOODLE_37_STABLE
    • MDL-65708-master
    • Hide

      Note: the fix has been successfully tested on learn.moodle.net during the peer-review

      To test this, you need a custom theme that uses the Boost as the parent theme. Your theme should not define its layouts (or not all of them at least). Instead, it should simply rely on the parent to provide their full list. https://moodle.org/plugins/theme_photo is an example of such a theme.

      Without this fix, such a theme will not simply work and will display the reported errors.

      With the fix, the theme should work again.

      Show
      Note: the fix has been successfully tested on learn.moodle.net during the peer-review To test this, you need a custom theme that uses the Boost as the parent theme. Your theme should not define its layouts (or not all of them at least). Instead, it should simply rely on the parent to provide their full list. https://moodle.org/plugins/theme_photo is an example of such a theme. Without this fix, such a theme will not simply work and will display the reported errors. With the fix, the theme should work again.

    Description

      The site learn.moodle.net uses a custom theme which is a child theme of the Boost. After upgrading the site to 3.7, it stopped working with error messages like

      Invalid page layout specified: login
      

      or

      Undefined index: standard in lib/outputlib.php on line 2464
      

      These are layouts provided by the boost's config file. Our custom theme only defines its own frontpage layout. All others are supposed to be inherited.

      It turned out to be a regression of MDL-64506 - the commit e00f1c663c1 changed the way how theme_config::__construct() sets the $baseconfig - before, it was always the bootstrapbase - so it loaded all its layouts etc. But now, we do not use it.

      Attachments

        Issue Links

          Activity

            People

              mathewmay Mathew May
              mudrd8mz David Mudrák (@mudrd8mz)
              David Mudrák (@mudrd8mz) David Mudrák (@mudrd8mz)
              Andrew Lyons Andrew Lyons
              Peter Dias Peter Dias
              Huong Nguyen, Bas Brands, Mathew May
              Votes:
              0 Vote for this issue
              Watchers:
              11 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                8/Jul/19

                Time Tracking

                  Estimated:
                  Original Estimate - 0 minutes
                  0m
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 2 hours, 17 minutes
                  2h 17m