• MOODLE_25_STABLE
    • MOODLE_25_STABLE
    • Hide

      This is quite difficult to test as we don't often use SimpleYUI and it isn't often obvious that the configuration is not being used. It will become more obvious in time as we Shift more and more modules.

      The easiest way of telling at present is to ensure that Y.log does not print your message when called directly on the Y object and when debug is disabled.

      For completeness, I would advise testing this before the patch is applied (sorry - I know how much of a pain that is), and comparing with the new result.

      • Set $CFG->debug = 0; in your config.php to disable debugging.
      • Open the JS console
      • Refresh a page
      • Confirm that no errors are shown
      • Enter:
        Y.log("MDL-38507");
      • Confirm that the log message was not displayed

      Note: You may see a YUI object displayed in the console. This is the return value of Y.log() and is not normally printed to the console. It's just a side-effect of using the console for this kind of testing.

      Show
      This is quite difficult to test as we don't often use SimpleYUI and it isn't often obvious that the configuration is not being used. It will become more obvious in time as we Shift more and more modules. The easiest way of telling at present is to ensure that Y.log does not print your message when called directly on the Y object and when debug is disabled. For completeness, I would advise testing this before the patch is applied (sorry - I know how much of a pain that is), and comparing with the new result. Set $CFG->debug = 0; in your config.php to disable debugging. Open the JS console Refresh a page Confirm that no errors are shown Enter: Y.log(" MDL-38507 "); Confirm that the log message was not displayed Note: You may see a YUI object displayed in the console. This is the return value of Y.log() and is not normally printed to the console. It's just a side-effect of using the console for this kind of testing.

      As discussed in the chat the other day, SimpleYUI is loaded (and thus set up) before we define YUI_config in the page header.

      You can see this by setting:

      $CFG->debug = 0;
      

      Refreshing your page, and in your browser JS console running:

      Y.log("This should not be shown");
      

      Which will of course display your message.

      Conversely:

      YUI().use('node', function(Y) { Y.log("This won't actually be shown"); });
      

      Will not actually show a message (though your browser may display info about the YUI() return value itself).

      The best option I see is to move the definition of YUI_config to above the inclusion of the simpleYUI script.

      This will need to be integrated after MDL-36198 and MDL-38391.

            dobedobedoh Andrew Lyons
            dobedobedoh Andrew Lyons
            Petr Skoda Petr Skoda
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Frédéric Massart Frédéric Massart
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

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