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

Function 'theme_boost\output\core_renderer::edit_button' throws an Exception when "haseditswitch" has no value.

XMLWordPrintable

    • MOODLE_402_STABLE, MOODLE_403_STABLE, MOODLE_404_STABLE
    • MOODLE_402_STABLE, MOODLE_403_STABLE
    • v_4_3_0
    • fix-single-button-rendering
    • Hide
      1. Edit theme/boost/config.php and comment the $THEME->haseditswitch setting:

        // $THEME->haseditswitch = true;

      2. Login as admin.
      3. Browse to Dashboard > Site administration > Appearance > Themes > Theme selector.
      4. Change theme to Boost.
      5. Browse to a course (which has the "Turn editing on" button).
      6. Check the course page is displayed and no error appears.
      7. Check the Turn editing off button is displayed as a primary button above the Bulk actions button.
      8. Turn editing off.
      9. Check the Turn editing on button is displayed as a primary button.
      Show
      Edit theme/boost/config.php and comment the $THEME->haseditswitch setting: // $THEME->haseditswitch = true; Login as admin. Browse to Dashboard > Site administration > Appearance > Themes > Theme selector . Change theme to Boost . Browse to a course (which has the " Turn editing on " button). Check the course page is displayed and no error appears. Check the Turn editing off button is displayed as a primary button above the Bulk actions button. Turn editing off. Check the Turn editing on button is displayed as a primary button.

      There is a regression in Moodle 4.2 (also affecting 4.3) where the constructor of single_button in lib/outputcomponents.php changed, but the core_renderer.php in the boost theme wasn't updated to take account for that.

      My colleague, Dominic Chin, created a PR on GitHub with a small patch to resolve this. I've also attached it as 427.patch to this bug report.

        1. 427.patch
          2 kB
        2. MDL-80035.png
          MDL-80035.png
          327 kB
        3. moodle_boost_stacktrace.png
          moodle_boost_stacktrace.png
          132 kB

            dominicchinkh dominicchinkh
            nathanjrobertson Nathan Robertson
            Sara Arjona (@sarjona) Sara Arjona (@sarjona)
            Amaia Anabitarte Amaia Anabitarte
            Ron Carl Alfon Yu Ron Carl Alfon Yu
            Votes:
            1 Vote for this issue
            Watchers:
            14 Start watching this issue

              Created:
              Updated:
              Resolved:

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

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.