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

JavaScript core/str can wrongfully cache parameters

XMLWordPrintable

    • MOODLE_38_STABLE
    • MOODLE_38_STABLE
    • MDL-67434-master
    • Hide
      1. Download teststr.php to your Moodle instance's root folder.
      2. Disable the "cachejs" admin setting. (If you're using MDK, simply do "mdk run undev")
      3. Open "teststr.php" on your browser
      4. Confirm that all of the "Actual" and "expected" string values are the same.
      5. Enable "cachejs" (On MDK: "mdk run mindev")
      6. Refresh the "teststr.php" page.
      7. Confirm that all of the "Actual" and "expected" string values remain the same.
      Show
      Download teststr.php to your Moodle instance's root folder. Disable the " cachejs " admin setting. (If you're using MDK, simply do " mdk run undev ") Open " teststr.php " on your browser Confirm that all of the " Actual " and " expected " string values are the same. Enable " cachejs " (On MDK: " mdk run mindev ") Refresh the " teststr.php " page. Confirm that all of the " Actual " and " expected " string values remain the same.

      The JavaScript core/str::get_strings() function can wrongfully cache the promise parameters when it lacks cache and multiple calls to get_string are made within a short time.

      I believe that this issue would mostly only happen during development, or prior to language strings being cached in the browser.

      See attached file for replication steps.

            fred Frédéric Massart
            fred Frédéric Massart
            Jun Pataleta Jun Pataleta
            Andrew Lyons Andrew Lyons
            Janelle Barcega Janelle Barcega
            Votes:
            1 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 - 1 hour, 30 minutes
                1h 30m

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