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

Translation caching is broken when there is no translation

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.9
    • Fix Version/s: 3.9
    • Component/s: H5P
    • Testing Instructions:
      Hide
      1. Purge caches
      2. Place the attached test_editor.php into your moodle root dir
      3. Login as admin
      4. Navigate to a course
      5. Turn editing on
      6. Add a new label
      7. In the label click the H5P toolbar button
      8. Upload the attached chart.h5p
      9. Navigate to http://yoursite/test_editor.php
      10. Edit the H5P activity you just created
        Note: This is just to fill the cache initially
        1. Confirm that it loads fully
      11. Refresh the page
        1. Confirm that it loads fully
      Show
      Purge caches Place the attached test_editor.php into your moodle root dir Login as admin Navigate to a course Turn editing on Add a new label In the label click the H5P toolbar button Upload the attached chart.h5p Navigate to http://yoursite/test_editor.php Edit the H5P activity you just created Note: This is just to fill the cache initially Confirm that it loads fully Refresh the page Confirm that it loads fully
    • Affected Branches:
      MOODLE_39_STABLE
    • Fixed Branches:
      MOODLE_39_STABLE
    • Pull Master Branch:
      MDL-68697-master

      Description

      With the chart.h5p example there is no english translation. We store the negative result as a bool in the cache, but the cache cannot cope with a false value and sees that as a failure when calling unserialize, throwing an exception.

      We cannot store a false value in a cache key it seems.

        Attachments

        1. chart.h5p
          107 kB
        2. image-2020-05-14-10-31-46-828.png
          image-2020-05-14-10-31-46-828.png
          48 kB
        3. test_editor.php
          5 kB

          Issue Links

            Activity

              People

              Assignee:
              dobedobedoh Andrew Nicols
              Reporter:
              dobedobedoh Andrew Nicols
              Peer reviewer:
              Sara Arjona (@sarjona)
              Integrator:
              Víctor Déniz Falcón
              Tester:
              Janelle Barcega
              Participants:
              Component watchers:
              Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona)
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                15/Jun/20

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 hour, 19 minutes
                  1h 19m