Moodle
  1. Moodle
  2. MDL-36825

If the cache file/folder is unavailable, moodle becomes inaccessible

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: 2.4
    • Fix Version/s: 2.4
    • Component/s: Caching
    • Labels:
    • Testing Instructions:
      Hide
      1. Create a directory in your systems temp directory (/tmp/muc)
      2. Make sure that no one has write access to that new directory.
      3. Log in as an admin
      4. Turn on performance info if you don't already have it on.
      5. Browse to Settings > Plugins > Caching > Configuration
      6. Add a file store instance and provide it with the directory you created.
      7. Map the new file store to the string cache.
      8. Browse to the home page.
      9. Make sure you see the following:
        1. A debugging notice about the directory for your file store not being writable.
        2. In the performance info under string cache you see that it is using the dummy store.
        3. You don't get any warning from mkdir.
      Show
      Create a directory in your systems temp directory (/tmp/muc) Make sure that no one has write access to that new directory. Log in as an admin Turn on performance info if you don't already have it on. Browse to Settings > Plugins > Caching > Configuration Add a file store instance and provide it with the directory you created. Map the new file store to the string cache. Browse to the home page. Make sure you see the following: A debugging notice about the directory for your file store not being writable. In the performance info under string cache you see that it is using the dummy store. You don't get any warning from mkdir.
    • Affected Branches:
      MOODLE_24_STABLE
    • Fixed Branches:
      MOODLE_24_STABLE
    • Pull Master Branch:
      wip-MDL-36825-m24
    • Rank:
      46347

      Description

      Trace:

      The given file cache store path does not exist.

      line 121 of /cache/stores/file/lib.php: call to debugging()
      line 215 of /cache/classes/factory.php: call to cachestore_file->__construct()
      line 145 of /cache/classes/helper.php: call to cache_factory->create_store_from_config()
      line 130 of /cache/classes/helper.php: call to cache_helper::initialise_cachestore_instances()
      line 186 of /cache/classes/factory.php: call to cache_helper::get_cache_stores()
      line 138 of /cache/classes/factory.php: call to cache_factory->create_cache()
      line 169 of /cache/classes/loaders.php: call to cache_factory->create_cache_from_definition()
      line 6490 of /lib/moodlelib.php: call to cache::make()
      line 6327 of /lib/moodlelib.php: call to core_string_manager->__construct()
      line 10697 of /lib/moodlelib.php: call to get_string_manager()
      line 745 of /lib/setup.php: call to setup_lang_from_browser()
      line 37 of /config.php: call to require_once()
      line 31 of /index.php: call to require_once()

      Warning: mkdir(): Permission denied in /var/www/repos/imaster/moodle/lib/setuplib.php on line 1199

        Issue Links

          Activity

          Hide
          Sam Hemelryk added a comment -

          Thanks for the report Jason.

          I managed to replicate the issue this morning, luckily it is a very simple fix.
          I've added details for a patch to fix this and have marked this as triaged now.

          Many thanks
          Sam

          Show
          Sam Hemelryk added a comment - Thanks for the report Jason. I managed to replicate the issue this morning, luckily it is a very simple fix. I've added details for a patch to fix this and have marked this as triaged now. Many thanks Sam
          Hide
          Dan Poltawski added a comment -

          Thanks Sam, i've integrated this now.

          Show
          Dan Poltawski added a comment - Thanks Sam, i've integrated this now.
          Hide
          Rossiani Wijaya added a comment -

          This works as expected.

          Test passed.

          Show
          Rossiani Wijaya added a comment - This works as expected. Test passed.
          Hide
          Eloy Lafuente (stronk7) added a comment -

          Y E S !

          Closing as fixed, many thanks!

          Show
          Eloy Lafuente (stronk7) added a comment - Y E S ! Closing as fixed, many thanks!

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: