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

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

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.0.5, 3.1, 3.2
    • Fix Version/s: 3.0.6, 3.1.2
    • Component/s: Blocks
    • Labels:
    • Testing Instructions:
      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.
    • Affected Branches:
      MOODLE_30_STABLE, MOODLE_31_STABLE, MOODLE_32_STABLE
    • Fixed Branches:
      MOODLE_30_STABLE, MOODLE_31_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-55166-master-blocksettings

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  12/Sep/16

                  Time Tracking

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