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

Allow support for patching YUI between versions

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.5.4
    • Fix Version/s: 2.7
    • Component/s: JavaScript, Libraries
    • Labels:
    • Affected Branches:
      MOODLE_25_STABLE
    • Fixed Branches:
      MOODLE_27_STABLE
    • Pull Master Branch:
      MDL-43952-master
    • Testing Instructions:
      Hide

      If using mdk, please run ```mdk run undev``` first
      Also, ensure that you haven't got debug set, or any of the following:

      • $CFG->useexternalyui
      • $CFG->cachejs
      • $CFG->yuicomboloading
      Destructions:
      • Open a course and turn editing on
      • Open browser console
      • Open network tab
      • In your config.php, set:

        $CFG->useexternalyui = false;
        

      • Refresh the page
      • Search for 'dd-ddm'
        • Confirm it has a path including the pattern '/3.13.0/dd-ddm'
        • Confirm the content of the JS looks valid (no warnings etc)
      • In your lib/setup.php, set:

        $CFG->yuipatchlevel = 1;
        $CFG->yuipatchedmodules = array(
            'dd-ddm',
        );
        

      • Refresh the page
      • Search for 'dd-ddm'
        • Confirm it has a path including the pattern '/3.13.0_1/dd-ddm'
        • Confirm the content of the JS looks valid (no warnings etc)
      • In your config.php set:

        $CFG->useexternalyui = true;
        

      • Refresh the page
      • Search for 'dd-ddm'
        • Confirm it has a path including the pattern '/3.13.0_1/dd-ddm'
        • Confirm that all other YUI modules were loaded from their CDN, except this one
        • Confirm the content of the JS looks valid (no warnings etc)
      • In your config.php set:

        $CFG->useexternalyui = true;
        $CFG->yuicomboloading = false;
        

      • Refresh the page
      • Search for 'dd-ddm'
        • Confirm it has a path including the pattern '/3.13.0_1/dd-ddm'
        • Confirm that all other YUI modules were loaded from their CDN, except this one
        • Confirm it used the combo loader anyway
        • Confirm the content of the JS looks valid (no warnings etc)
      • In your config.php set:

        $CFG->useexternalyui = false;
        $CFG->yuicomboloading = false;
        

      • Refresh the page
      • Search for 'dd-ddm'
        • Confirm it has a path including the pattern '/3.13.0_1/dd-ddm'
        • Confirm it used the combo loader anyway
        • Confirm the content of the JS looks valid (no warnings etc)
      Show
      If using mdk, please run ```mdk run undev``` first Also, ensure that you haven't got debug set, or any of the following: $CFG->useexternalyui $CFG->cachejs $CFG->yuicomboloading Destructions: Open a course and turn editing on Open browser console Open network tab In your config.php, set: $CFG->useexternalyui = false; Refresh the page Search for 'dd-ddm' Confirm it has a path including the pattern '/3.13.0/dd-ddm' Confirm the content of the JS looks valid (no warnings etc) In your lib/setup.php, set: $CFG->yuipatchlevel = 1; $CFG->yuipatchedmodules = array( 'dd-ddm', ); Refresh the page Search for 'dd-ddm' Confirm it has a path including the pattern '/3.13.0_1/dd-ddm' Confirm the content of the JS looks valid (no warnings etc) In your config.php set: $CFG->useexternalyui = true; Refresh the page Search for 'dd-ddm' Confirm it has a path including the pattern '/3.13.0_1/dd-ddm' Confirm that all other YUI modules were loaded from their CDN, except this one Confirm the content of the JS looks valid (no warnings etc) In your config.php set: $CFG->useexternalyui = true; $CFG->yuicomboloading = false; Refresh the page Search for 'dd-ddm' Confirm it has a path including the pattern '/3.13.0_1/dd-ddm' Confirm that all other YUI modules were loaded from their CDN, except this one Confirm it used the combo loader anyway Confirm the content of the JS looks valid (no warnings etc) In your config.php set: $CFG->useexternalyui = false; $CFG->yuicomboloading = false; Refresh the page Search for 'dd-ddm' Confirm it has a path including the pattern '/3.13.0_1/dd-ddm' Confirm it used the combo loader anyway Confirm the content of the JS looks valid (no warnings etc)

      Description

      We have had a few occasions where we've had to patch YUI between versions. For some this will work without issue, but because we aggressively cache for a long time (1 year IIRC) in the browser, some users will not see these changes without a manual browser cache purge.

      We need to be able to add a sub-version number to our YUI and force use of our combo loader for specific modules in order to support patching properly.

      This is further complicated since:

      • we must use the combo loader - the non-combo version uses direct paths and cannot support revisions in a sensible fashion;
      • we cannot use the CDN, even if the option to use it is set

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              dobedobedoh Andrew Lyons
              Reporter:
              dobedobedoh Andrew Lyons
              Peer reviewer:
              Petr Skoda Petr Skoda
              Integrator:
              Sam Hemelryk Sam Hemelryk
              Tester:
              Dan Poltawski Dan Poltawski
              Participants:
              Component watchers:
              Andrew Lyons, Dongsheng Cai, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze, Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Sara Arjona (@sarjona)
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                12/May/14