Moodle
  1. Moodle
  2. MDL-36094

MUC is not prefixing Moodle dirroot to datasourcefile and overridefile.

    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:

      Description

      We need to prefix dirroot to the datasourcefile and overridefile in order to get things working.
      Don't expect slash at the front.

        Gliffy Diagrams

          Issue Links

            Activity

            Hide
            Sam Hemelryk added a comment -

            Just noting I will add unit tests to pick this up. In order to replicate the bug using the tests before my fix however you will need to build phpunit.xml files for the components using:

            php admin/tool/phpunit/cli/util.php --buildcomponentconfigs
            

            Then when running the unit tests:

            cd moodle/cache
            phpunit
            

            This ensure the file being included by the tests is not relative to the path in which execution is occurring.

            Show
            Sam Hemelryk added a comment - Just noting I will add unit tests to pick this up. In order to replicate the bug using the tests before my fix however you will need to build phpunit.xml files for the components using: php admin/tool/phpunit/cli/util.php --buildcomponentconfigs Then when running the unit tests: cd moodle/cache phpunit This ensure the file being included by the tests is not relative to the path in which execution is occurring.
            Hide
            Dan Poltawski added a comment -

            Sending all 'waiting for peer review' issues to integration before freeze, as agreed in Integrators Meeting 19/10/12. We are doing this to ensure any 'integratable issues' will not got missed before freeze..

            Show
            Dan Poltawski added a comment - Sending all 'waiting for peer review' issues to integration before freeze, as agreed in Integrators Meeting 19/10/12. We are doing this to ensure any 'integratable issues' will not got missed before freeze..
            Hide
            Dan Poltawski added a comment -

            Hi Sam,

            I can't reproduce the bug using your comment here. Running in /cache/ seems to work ok for me. Was wondering if I was missing something?

            Show
            Dan Poltawski added a comment - Hi Sam, I can't reproduce the bug using your comment here. Running in /cache/ seems to work ok for me. Was wondering if I was missing something?
            Hide
            Sam Hemelryk added a comment -

            Hi Dan,

            Sorry about the confusion with this one I should have been clearer.
            I've altered the unit tests to reproduce this issue and fixed at the same time, all within the same commit.
            The bug is not reproducible with the unit tests before change (but can be reproduced by writing a cache implementation that uses a datasource within a file that is not included by default and exists outside of the PHP's include path).

            In order to reproduce this issue using the tests you would need to take just the changes to the unit tests from my patch and then run things I mentioned above (just ensuring you run the unit tests in such a way that the includes won't fall in within the php include path).

            Many thanks
            Sam

            Show
            Sam Hemelryk added a comment - Hi Dan, Sorry about the confusion with this one I should have been clearer. I've altered the unit tests to reproduce this issue and fixed at the same time, all within the same commit. The bug is not reproducible with the unit tests before change (but can be reproduced by writing a cache implementation that uses a datasource within a file that is not included by default and exists outside of the PHP's include path). In order to reproduce this issue using the tests you would need to take just the changes to the unit tests from my patch and then run things I mentioned above (just ensuring you run the unit tests in such a way that the includes won't fall in within the php include path). Many thanks Sam
            Hide
            Sam Hemelryk added a comment -

            Also I think if you try to test MDL-34399 before this has been integrated you will get the error.

            Show
            Sam Hemelryk added a comment - Also I think if you try to test MDL-34399 before this has been integrated you will get the error.
            Hide
            Dan Poltawski added a comment -

            I'm still slightly confused I think, but integrated and runnign the unit tests myself.

            Show
            Dan Poltawski added a comment - I'm still slightly confused I think, but integrated and runnign the unit tests myself.
            Hide
            Dan Poltawski added a comment -

            I was getting problems with the other issue too.

            Show
            Dan Poltawski added a comment - I was getting problems with the other issue too.
            Hide
            Dan Poltawski added a comment -

            Hurray!

            You did it, congratulations! You have on Mojito credit to redeem after the release of Moodle 2.4

            Show
            Dan Poltawski added a comment - Hurray! You did it, congratulations! You have on Mojito credit to redeem after the release of Moodle 2.4

              People

              • Assignee:
                Sam Hemelryk
                Reporter:
                Sam Hemelryk
                Integrator:
                Dan Poltawski
                Tester:
                Dan Poltawski
                Participants:
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: