Moodle
  1. Moodle
  2. MDL-31653

Default setting for 'Display debug messages' is dynamic.

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Trivial Trivial
    • Resolution: Unresolved
    • Affects Version/s: 2.2.1
    • Fix Version/s: STABLE backlog
    • Component/s: Administration
    • Labels:
    • Environment:
    • Workaround:
      Hide

      Not really needed but I'm not sure of the impact of the code.

      Show
      Not really needed but I'm not sure of the impact of the code.
    • Affected Branches:
      MOODLE_22_STABLE
    • Rank:
      38224

      Description

      The default value for 'Display debug messages' in Site Administration->Development->Debugging changes to whatever the value of the tick box is upon refresh.

      Replication steps (from screenshot):

      1. Log in as admin
      2. Navigate to Site admin > Development > Debugging
      3. If the setting "Display debug messages" is unchecked, check it, save settings and click Debugging in the Settings block
      4. Uncheck (untick) the "Display debug messages" option
      5. Save changes to the form
      6. Click on Debugging again in the Settings block
      7. Note change to default value

        Activity

        Hide
        Michael de Raadt added a comment -

        Thanks for reporting that.

        I was able to reproduce the behaviour your found. The admin_setting_configcheckbox element for debugdisplay is attempting to take its default from the php.ini file using...

        /admin/settings/development.php line 21
        $temp->add(new admin_setting_configcheckbox('debugdisplay', new lang_string('debugdisplay', 'admin'), new lang_string('configdebugdisplay', 'admin'), ini_get_bool('display_errors')));
        

        ...however, this doesn't seem to be working.

        It might be useful for you to note what OS and web server you are using as this might affect the behaviour. I'm using Apache (XAMPP) under Windows for testing. In my php.ini file, the setting 'display_errors' was set to "On".

        Show
        Michael de Raadt added a comment - Thanks for reporting that. I was able to reproduce the behaviour your found. The admin_setting_configcheckbox element for debugdisplay is attempting to take its default from the php.ini file using... /admin/settings/development.php line 21 $temp->add( new admin_setting_configcheckbox('debugdisplay', new lang_string('debugdisplay', 'admin'), new lang_string('configdebugdisplay', 'admin'), ini_get_bool('display_errors'))); ...however, this doesn't seem to be working. It might be useful for you to note what OS and web server you are using as this might affect the behaviour. I'm using Apache (XAMPP) under Windows for testing. In my php.ini file, the setting 'display_errors' was set to "On".
        Hide
        Gareth J Barnard added a comment -

        Dear Michael,

        No problem. I have updated the environment - I hope that is enough information.

        Cheers,

        Gareth

        Show
        Gareth J Barnard added a comment - Dear Michael, No problem. I have updated the environment - I hope that is enough information. Cheers, Gareth
        Hide
        Rajesh Taneja added a comment -

        Hello. I will not be able to work on this issue in the immediate future. In order to create a truer sense of the state of this issue and to allow other developers to have chance to become involved, I am removing myself as the assignee of this issue.

        For more information, see http://docs.moodle.org/dev/Changes_to_issue_assignment

        If you have any information about this issue or a possible fix please post it here

        Show
        Rajesh Taneja added a comment - Hello. I will not be able to work on this issue in the immediate future. In order to create a truer sense of the state of this issue and to allow other developers to have chance to become involved, I am removing myself as the assignee of this issue. For more information, see http://docs.moodle.org/dev/Changes_to_issue_assignment If you have any information about this issue or a possible fix please post it here
        Show
        Justin Filip added a comment - This problem is actually caused by /lib/setup.php modifying the PHP ini value based on the Moodle config value: https://github.com/moodle/moodle/blob/b5f1e8f1e7b5a8cd4c63021a7bc832640432883e/lib/setup.php#L313-L335 https://github.com/moodle/moodle/blob/b5f1e8f1e7b5a8cd4c63021a7bc832640432883e/lib/setup.php#L642-L655

          People

          • Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated: