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

get_default_stores() does not ensure stores have been included.

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.4.3
    • Fix Version/s: 2.4.4
    • Component/s: Caching
    • Labels:
      None
    • Testing Instructions:
      Hide
      1. Clean install 2.4.3 (release - not stable weekly) - upgrade to master
      2. Verify you do not see the error reported in the description
      3. Install 2.4 latest stable weekly - upgrade to master integration
      4. Verify you do not see the error reported in the description
      5. Install 2.3 latest stable weekly - upgrade to 2.4 integration
      6. Verify you do not see the error reported in the description
      Show
      Clean install 2.4.3 (release - not stable weekly) - upgrade to master Verify you do not see the error reported in the description Install 2.4 latest stable weekly - upgrade to master integration Verify you do not see the error reported in the description Install 2.3 latest stable weekly - upgrade to 2.4 integration Verify you do not see the error reported in the description
    • Affected Branches:
      MOODLE_24_STABLE
    • Fixed Branches:
      MOODLE_24_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-39602-master

      Description

      Michael reported an error during upgrade of 2.4 (not 2.3 or master)...

      Fatal error: Class 'cachestore_file' not found in D:\xampp\htdocs\24_integration\cache\locallib.php on line 393
      (11:18:18) Michael d: Is anyone else experiencing that?

      It looks like get_default_stores should include the required_once the store files inside that function so it is safe to call it from anywhere.

      Will get more specifics on how to trigger this error for the testing instructions.

        Gliffy Diagrams

          Activity

          Hide
          salvetore Michael de Raadt added a comment -

          This occurred for me on 2.4 only. I'm not sure why it was different.

          I'm setting up a fresh install to rule out a possible code corruption.

          This fix might be prudent regardless, but we should know if it is urgent after I set up a new instance.

          Show
          salvetore Michael de Raadt added a comment - This occurred for me on 2.4 only. I'm not sure why it was different. I'm setting up a fresh install to rule out a possible code corruption. This fix might be prudent regardless, but we should know if it is urgent after I set up a new instance.
          Hide
          salvetore Michael de Raadt added a comment -

          In the 24 fix, you'll need to shift the $CFG variable with the include calls.

          Show
          salvetore Michael de Raadt added a comment - In the 24 fix, you'll need to shift the $CFG variable with the include calls.
          Hide
          damyon Damyon Wiese added a comment -

          From the code - I think it might only occur during upgrades (from before 2012120303.08 on 24 and before 2013041900.00 on master) and may be related to the configured cache stores.

          Show
          damyon Damyon Wiese added a comment - From the code - I think it might only occur during upgrades (from before 2012120303.08 on 24 and before 2013041900.00 on master) and may be related to the configured cache stores.
          Hide
          damyon Damyon Wiese added a comment -

          (I repushed with the CFG fix)

          Show
          damyon Damyon Wiese added a comment - (I repushed with the CFG fix)
          Hide
          salvetore Michael de Raadt added a comment -

          I just ran the upgrade on a fresh site and no error came up. My previous 2.4 version was not as old as the version you suggest in the comment above.

          I'm happy with the change, but I'm not familiar with the code, so I wouldn't be confident in peer reviewing it while Sam is available.

          Show
          salvetore Michael de Raadt added a comment - I just ran the upgrade on a fresh site and no error came up. My previous 2.4 version was not as old as the version you suggest in the comment above. I'm happy with the change, but I'm not familiar with the code, so I wouldn't be confident in peer reviewing it while Sam is available.
          Hide
          salvetore Michael de Raadt added a comment -

          I've asked Sam to peer review this.

          Show
          salvetore Michael de Raadt added a comment - I've asked Sam to peer review this.
          Hide
          samhemelryk Sam Hemelryk added a comment -

          Thanks Michael + Damyon. Changes are spot on and I've integrated it now

          Show
          samhemelryk Sam Hemelryk added a comment - Thanks Michael + Damyon. Changes are spot on and I've integrated it now
          Hide
          markn Mark Nelson added a comment - - edited

          All upgrades went without a single issue, passing.

          Show
          markn Mark Nelson added a comment - - edited All upgrades went without a single issue, passing.
          Hide
          stronk7 Eloy Lafuente (stronk7) added a comment -

          Did you think this day was not going to arrive ever?

          Your patience has been rewarded, yay, sent upstream, thanks!

          Closing...ciao

          Show
          stronk7 Eloy Lafuente (stronk7) added a comment - Did you think this day was not going to arrive ever? Your patience has been rewarded, yay, sent upstream, thanks! Closing...ciao

            People

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

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                13/May/13