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

Wrong PATH attribute in some XMLDB install.xml files

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.1.9, 3.2.6, 3.3.3, 3.4, 3.5
    • Fix Version/s: 3.3.5, 3.4.2
    • Component/s: Database SQL/XMLDB
    • Labels:
    • Testing Instructions:
      Hide
      1. Requirements:
        1. linux & windows LAMP environments at hand. All testing must be done under both OS.
        2. Ability to modify some files to reproduce errors.
      2. stable testing (33 and 34):
        1. CONFIRM: Can install a Moodle instance without problem.
      3. master testing:
        1. Go to admin -> Development -> XMLDB editor (main page)
        2. CONFIRM: Can load files without problem.
        3. CONFIRM: Can install a Moodle instance without problem.
        4. Edit mod/workshop/form/rubric/db/install.xml and change the PATH attribute to point to any other relative path within moodle (mod/workshop/db for example).
        5. Go to admin -> Development -> XMLDB editor
        6. CONFIRM: CANNOT load the edited path (mod/workshop/form/rubric/db). Instead, you will get a message in the UI with text "PATH attribute does not match file directory: mod/workshop/form/rubric". And, with debug enabled, also some stack trace in the page or in logs (depends of your debug settings).
        7. CONFIRM: CANNOT install a Moodle instance (will get a message / stack trace with the text commented in the previous point.
      Show
      Requirements: linux & windows LAMP environments at hand. All testing must be done under both OS . Ability to modify some files to reproduce errors. stable testing (33 and 34): CONFIRM: Can install a Moodle instance without problem. master testing: Go to admin -> Development -> XMLDB editor (main page) CONFIRM: Can load files without problem. CONFIRM: Can install a Moodle instance without problem. Edit mod/workshop/form/rubric/db/install.xml and change the PATH attribute to point to any other relative path within moodle ( mod/workshop/db for example). Go to admin -> Development -> XMLDB editor CONFIRM: CANNOT load the edited path ( mod/workshop/form/rubric/db ). Instead, you will get a message in the UI with text " PATH attribute does not match file directory: mod/workshop/form/rubric ". And, with debug enabled, also some stack trace in the page or in logs (depends of your debug settings). CONFIRM: CANNOT install a Moodle instance (will get a message / stack trace with the text commented in the previous point.
    • Affected Branches:
      MOODLE_31_STABLE, MOODLE_32_STABLE, MOODLE_33_STABLE, MOODLE_34_STABLE, MOODLE_35_STABLE
    • Fixed Branches:
      MOODLE_33_STABLE, MOODLE_34_STABLE
    • Pull from Repository:
    • Pull Master Branch:

      Description

      Detected a case when testing MDL-23887, it seems that there are a few cases where the PATH element in the install.xml files does not match the real path of the file. Surely because of copy/paste operations or moved subplugin types or whatever.

      That PATH is never checked (and right now only used to generate savepoints php code within the editor), so it should be correct, so better we start checking it ASAP.

      This issue is about :

      • Fix wrong cases (stables & master).
      • Implement a check in the xmldb stuff in order to avoid this in the future (master only).
      • Warn about the new check (upgrade.php / devs ..) so people knows about if for master.

      Ciao

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  19/Mar/18