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

Expose YUI deprecation warnings to developers in Console

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Major Major
    • None
    • 2.6
    • HTML and CSS, Libraries
    • MOODLE_26_STABLE
    • MDL-42960-master
    • Hide

      Open your JS console for these tests.

      • Disable DEBUG_DEVELOPER
      • Browse around Moodle generally
        • Confirm that there are no YUI log messages displayed (note, your browser may emit a few messages and warnings, but they shouldn't come from YUI)
      • Enable DEBUG_DEVELOPER
      • Browse around Moodle generally
        • Confirm that there are relatively few log messages (those presented should have a log level of warn, or error)
      • In the console try (and use your cunning detective skills to confirm that they work as expected:

        Y.log('This message will not be displayed');
        Y.log('This message will not be displayed', 'debug');
        Y.log('This message will not be displayed', 'info');
        Y.log('This message will be displayed', 'warn');
        Y.log('This message will be displayed', 'error');
        

      • Open your config.php and set:

        $CFG->yuiloginclude = array(
            'moodle-core-dock-loader' => true,
            '42960' => true,
        );
        

      • Open the home page in Moodle in any theme which supports the dock
        • Confirm that you saw messages relating to the dock loader
        • Confirm something relating to the dock was displayed
      • Confirm the following work as expected when entered into the console:

        Y.log('This message will be displayed');
        Y.log('This message will be displayed', 'debug');
        Y.log('This message will be displayed', 'info');
        Y.log('This message will be displayed', 'warn');
        Y.log('This message will be displayed', 'error');
        Y.log('This message will be displayed', 'debug', '42960');
        Y.log('This message will be displayed', 'info', '42960');
        Y.log('This message will be displayed', 'warn', '42960');
        Y.log('This message will be displayed', 'error', '42960');
        Y.log('This message will not be displayed', 'debug', 'somethingelse');
        Y.log('This message will not be displayed', 'info', 'somethingelse');
        Y.log('This message will not be displayed', 'warn', 'somethingelse');
        Y.log('This message will not be displayed', 'error', 'somethingelse');
        

      • Open your config.php and set:

        $CFG->yuiloginclude = array();
        $CFG->yuilogexclude = array(
            'moodle-core-dock-loader' => true,
            '42960' => true,
        );
        

      • Refresh the page you previously loaded
        • Confirm that nothing relating to the dock loader was displayed
        • Confirm something relating to the dock was displayed
      • Confirm the following work as expected when entered into the console:

        Y.log('This message will be displayed');
        Y.log('This message will be displayed', 'debug');
        Y.log('This message will be displayed', 'info');
        Y.log('This message will be displayed', 'warn');
        Y.log('This message will be displayed', 'error');
        Y.log('This message will not be displayed', 'debug', '42960');
        Y.log('This message will not be displayed', 'info', '42960');
        Y.log('This message will not be displayed', 'warn', '42960');
        Y.log('This message will not be displayed', 'error', '42960');
        Y.log('This message will be displayed', 'debug', 'somethingelse');
        Y.log('This message will be displayed', 'info', 'somethingelse');
        Y.log('This message will be displayed', 'warn', 'somethingelse');
        Y.log('This message will be displayed', 'error', 'somethingelse');
        

      • Open your config.php and set:

        $CFG->yuiloginclude = array(
            'example' => true,
        );
        $CFG->yuilogexclude = array(
            'moodle-core-dock-loader' => true,
            '42960' => true,
        );
        

      • Refresh the page you previously loaded
        • Confirm that nothing relating to the dock loader was displayed
        • Confirm something relating to the dock was displayed
      • Confirm the following work as expected when entered into the console:

        Y.log('This message will be displayed');
        Y.log('This message will be displayed', 'debug');
        Y.log('This message will be displayed', 'info');
        Y.log('This message will be displayed', 'warn');
        Y.log('This message will be displayed', 'error');
        Y.log('This message will be displayed', 'debug', 'example');
        Y.log('This message will be displayed', 'info', 'example');
        Y.log('This message will be displayed', 'warn', 'example');
        Y.log('This message will be displayed', 'error', 'example');
        Y.log('This message will not be displayed', 'debug', '42960');
        Y.log('This message will not be displayed', 'info', '42960');
        Y.log('This message will not be displayed', 'warn', '42960');
        Y.log('This message will not be displayed', 'error', '42960');
        Y.log('This message will be displayed', 'debug', 'somethingelse');
        Y.log('This message will be displayed', 'info', 'somethingelse');
        Y.log('This message will be displayed', 'warn', 'somethingelse');
        Y.log('This message will be displayed', 'error', 'somethingelse');
        

      • Open your config.php and set:

        $CFG->yuilogexclude = array();
        $CFG->yuiloginclude = array(
            '42960' => true,
            '' => false,
        );
        

      • Refresh the page you previously loaded
        • Confirm that nothing relating to the dock loader was displayed
        • Confirm something relating to the dock was displayed
      • Confirm the following work as expected when entered into the console:

        Y.log('This message will not be displayed');
        Y.log('This message will not be displayed', 'debug');
        Y.log('This message will not be displayed', 'info');
        Y.log('This message will not be displayed', 'warn');
        Y.log('This message will not be displayed', 'error');
        Y.log('This message will be displayed', 'debug', '42960');
        Y.log('This message will be displayed', 'info', '42960');
        Y.log('This message will be displayed', 'warn', '42960');
        Y.log('This message will be displayed', 'error', '42960');
        

      Show
      Open your JS console for these tests. Disable DEBUG_DEVELOPER Browse around Moodle generally Confirm that there are no YUI log messages displayed (note, your browser may emit a few messages and warnings, but they shouldn't come from YUI) Enable DEBUG_DEVELOPER Browse around Moodle generally Confirm that there are relatively few log messages (those presented should have a log level of warn, or error) In the console try (and use your cunning detective skills to confirm that they work as expected: Y.log('This message will not be displayed'); Y.log('This message will not be displayed', 'debug'); Y.log('This message will not be displayed', 'info'); Y.log('This message will be displayed', 'warn'); Y.log('This message will be displayed', 'error'); Open your config.php and set: $CFG->yuiloginclude = array( 'moodle-core-dock-loader' => true, '42960' => true, ); Open the home page in Moodle in any theme which supports the dock Confirm that you saw messages relating to the dock loader Confirm something relating to the dock was displayed Confirm the following work as expected when entered into the console: Y.log('This message will be displayed'); Y.log('This message will be displayed', 'debug'); Y.log('This message will be displayed', 'info'); Y.log('This message will be displayed', 'warn'); Y.log('This message will be displayed', 'error'); Y.log('This message will be displayed', 'debug', '42960'); Y.log('This message will be displayed', 'info', '42960'); Y.log('This message will be displayed', 'warn', '42960'); Y.log('This message will be displayed', 'error', '42960'); Y.log('This message will not be displayed', 'debug', 'somethingelse'); Y.log('This message will not be displayed', 'info', 'somethingelse'); Y.log('This message will not be displayed', 'warn', 'somethingelse'); Y.log('This message will not be displayed', 'error', 'somethingelse'); Open your config.php and set: $CFG->yuiloginclude = array(); $CFG->yuilogexclude = array( 'moodle-core-dock-loader' => true, '42960' => true, ); Refresh the page you previously loaded Confirm that nothing relating to the dock loader was displayed Confirm something relating to the dock was displayed Confirm the following work as expected when entered into the console: Y.log('This message will be displayed'); Y.log('This message will be displayed', 'debug'); Y.log('This message will be displayed', 'info'); Y.log('This message will be displayed', 'warn'); Y.log('This message will be displayed', 'error'); Y.log('This message will not be displayed', 'debug', '42960'); Y.log('This message will not be displayed', 'info', '42960'); Y.log('This message will not be displayed', 'warn', '42960'); Y.log('This message will not be displayed', 'error', '42960'); Y.log('This message will be displayed', 'debug', 'somethingelse'); Y.log('This message will be displayed', 'info', 'somethingelse'); Y.log('This message will be displayed', 'warn', 'somethingelse'); Y.log('This message will be displayed', 'error', 'somethingelse'); Open your config.php and set: $CFG->yuiloginclude = array( 'example' => true, ); $CFG->yuilogexclude = array( 'moodle-core-dock-loader' => true, '42960' => true, ); Refresh the page you previously loaded Confirm that nothing relating to the dock loader was displayed Confirm something relating to the dock was displayed Confirm the following work as expected when entered into the console: Y.log('This message will be displayed'); Y.log('This message will be displayed', 'debug'); Y.log('This message will be displayed', 'info'); Y.log('This message will be displayed', 'warn'); Y.log('This message will be displayed', 'error'); Y.log('This message will be displayed', 'debug', 'example'); Y.log('This message will be displayed', 'info', 'example'); Y.log('This message will be displayed', 'warn', 'example'); Y.log('This message will be displayed', 'error', 'example'); Y.log('This message will not be displayed', 'debug', '42960'); Y.log('This message will not be displayed', 'info', '42960'); Y.log('This message will not be displayed', 'warn', '42960'); Y.log('This message will not be displayed', 'error', '42960'); Y.log('This message will be displayed', 'debug', 'somethingelse'); Y.log('This message will be displayed', 'info', 'somethingelse'); Y.log('This message will be displayed', 'warn', 'somethingelse'); Y.log('This message will be displayed', 'error', 'somethingelse'); Open your config.php and set: $CFG->yuilogexclude = array(); $CFG->yuiloginclude = array( '42960' => true, '' => false, ); Refresh the page you previously loaded Confirm that nothing relating to the dock loader was displayed Confirm something relating to the dock was displayed Confirm the following work as expected when entered into the console: Y.log('This message will not be displayed'); Y.log('This message will not be displayed', 'debug'); Y.log('This message will not be displayed', 'info'); Y.log('This message will not be displayed', 'warn'); Y.log('This message will not be displayed', 'error'); Y.log('This message will be displayed', 'debug', '42960'); Y.log('This message will be displayed', 'info', '42960'); Y.log('This message will be displayed', 'warn', '42960'); Y.log('This message will be displayed', 'error', '42960');

      DEBUG_DEVELOPER settings need to enable warning developers when they are using deprecated code in yui library. e.g. :Y.get() - was in deprecation list in the YUI we distributed in 2.5 , in 2.6 the YUI we distribute removed it.

      We need to warn about this as new developers that come along and use the libs we distribute need to know those functions are deprecated.

            Unassigned Unassigned
            nebgor Aparup Banerjee
            Petr Skoda Petr Skoda
            Dan Poltawski Dan Poltawski
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:

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