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

Set named constant in jssourcemap.php for better flow control in config callbacks

XMLWordPrintable

    • MOODLE_402_STABLE
    • MOODLE_400_STABLE, MOODLE_401_STABLE, MOODLE_402_STABLE
    • MDL-78431-401
    • MDL-78431-402
    • MDL-78431-master
    • Hide
      1. Ensure that cachejs is set to false, for example using:

        mdk run dev
        

        or finding the setting in site administration and ensuring that it is unchecked

      2. Open any page in Moodle
      3. Open your Browser Developer tools
      4. Open the "Sources" tab
      5. Press Control + P to open the "Open file" menu
      6. Search for lib/amd/src and select the first item in the list
        1. Confirm that you can see non-minified code
          To be clear, the code looks meaningful, it has comments, it has meaningful variable names, whitespace, a copyright statement, etc.
      Show
      Ensure that cachejs is set to false, for example using: mdk run dev or finding the setting in site administration and ensuring that it is unchecked Open any page in Moodle Open your Browser Developer tools Open the "Sources" tab Press Control + P to open the "Open file" menu Search for lib/amd/src and select the first item in the list Confirm that you can see non-minified code To be clear, the code looks meaningful, it has comments, it has meaningful variable names, whitespace, a copyright statement, etc.

      We encountered a problem that was not obvious to identify, which was related to the fact that `lib/jssourcemap.php` loads config and all plugin config callbacks at the point when it is not expected and breaks some flow control. I suggest either to set AJAX_SCRIPT or other dedicated named constant (e.g. SOURCEMAP) in jssourcemap.php, so it can be identified in plugin callbacks.

            dobedobedoh Andrew Lyons
            kabalin Ruslan Kabalin
            Ruslan Kabalin Ruslan Kabalin
            Jun Pataleta Jun Pataleta
            Kim Jared Lucas Kim Jared Lucas
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 35 minutes
                35m

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