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

debugging message when $settings = null; in block's settings.php

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 3.0.6, 3.1.2
    • 3.0.5, 3.1, 3.2
    • Blocks
    • MOODLE_30_STABLE, MOODLE_31_STABLE, MOODLE_32_STABLE
    • MOODLE_30_STABLE, MOODLE_31_STABLE
    • MDL-55166-master-blocksettings
    • Hide
      1. Find a block that declares has_config() as true and has its own settings.php file - such as block_html
      2. Add a line to the settings.php file of that block that sets the variable $setting to null - typically at the end of the file.
      3. Make sure the development debugging is on and debug messages are displayed.
      4. Visit Site administration > Plugins > Blocks > Manage blocks and make sure you do not see the reported debugging warning.
      Show
      Find a block that declares has_config() as true and has its own settings.php file - such as block_html Add a line to the settings.php file of that block that sets the variable $setting to null - typically at the end of the file. Make sure the development debugging is on and debug messages are displayed. Visit Site administration > Plugins > Blocks > Manage blocks and make sure you do not see the reported debugging warning.

      According to line 99 of lib/classes/plugininfo/block.php, settings.php pages are allowed to set $settings = null;. However, if this is done, a debugging message appears from from admin/blocks.php (from line 158.

      That debugging message was added because of: https://tracker.moodle.org/browse/MDL-47979

      Please enable re-enable $settings = null; in a block's settings.php.

      The reason for needing to set $settings = null; to allow a (block) plugin to contribute non-default settings pages (ie, by creating new admin_settingpage instances and adding them elsewhere in the settings tree), without automatically adding a settings tree link to its default settings page.

            mudrd8mz David Mudrák (@mudrd8mz)
            janeklb Janek L.B.
            Janek L.B. Janek L.B.
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 hour, 10 minutes
                1h 10m

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