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

Install fails for renamed admin folder

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide

      Note: This is easier to test with MDK.

      1. On a Moodle instance that is currently installed, backup your config.php file.

        cp config.php config.php.bak

      2. Uninstall your moodle instance.

        mdk uninstall -y

      3. Restore your config.php

        mv config.php.bak config.php

      4. Rename the admin folder. e.g.

        mv admin administration

      5. Edit config.php and set change the value of the $CFG->admin to the renamed folder. e.g.

        $CFG->admin = 'administration';

      6. Create the database that you will use for your moodle instance. (Defined in config.php)
      7. Install your Moodle instance.

        php administration/cli/install_database.php --adminpass=test --adminemail=admin@example.com --agree-license

        • Confirm that the installation successfully completes.
      Post test
      1. Be sure to revert your admin folder to the original. Same with $CFG->admin in config.php.
      Show
      Note: This is easier to test with MDK. On a Moodle instance that is currently installed, backup your config.php file. cp config.php config.php.bak Uninstall your moodle instance. mdk uninstall -y Restore your config.php mv config.php.bak config.php Rename the admin folder. e.g. mv admin administration Edit config.php and set change the value of the $CFG->admin to the renamed folder. e.g. $CFG->admin = 'administration'; Create the database that you will use for your moodle instance. (Defined in config.php) Install your Moodle instance. php administration/cli/install_database.php --adminpass=test --adminemail=admin@example.com --agree-license Confirm that the installation successfully completes. Post test Be sure to revert your admin folder to the original. Same with $CFG->admin in config.php.
    • Workaround:
      Hide

      Don't use a hosting provider that requires you to rename your admin folder.

      Show
      Don't use a hosting provider that requires you to rename your admin folder.
    • Affected Branches:
      MOODLE_35_STABLE
    • Fixed Branches:
      MOODLE_35_STABLE
    • Pull Master Branch:
      MDL-61766-master

      Description

      To reproduce:

      1. Rename the admin folder.
      2. Perform the install process. (You'll need to specify the new admin folder in one of the install pages).
      3. Expected: The installation will successfully complete.
      4. Actual: The install fails with the following errors:

        XML database file errors found
         
        More information about this error
         
        It is usually not possible to recover from errors triggered during installation, you may need to create a new database or use a different database prefix if you want to retry the installation.
         
        �Debug info: Errors found in XMLDB file: PATH attribute does not match file directory: administration/tool/cohortroles/db
        Error code: ddlxmlfileerror
        �Stack trace:
        line 352 of /lib/ddl/database_manager.php: ddl_exception thrown
        line 368 of /lib/ddl/database_manager.php: call to database_manager->load_xmldb_file()
        line 590 of /lib/upgradelib.php: call to database_manager->install_from_xmldb_file()
        line 1850 of /lib/upgradelib.php: call to upgrade_plugins()
        line 694 of /administration/index.php: call to upgrade_noncore()
        

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              jpataleta Jun Pataleta
              Reporter:
              jpataleta Jun Pataleta
              Peer reviewer:
              Tim Hunt
              Integrator:
              Eloy Lafuente (stronk7)
              Tester:
              Janelle Barcega
              Participants:
              Component watchers:
              Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze, Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze, Matteo Scaramuccia, Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                17/May/18

                  Time Tracking

                  Estimated:
                  Original Estimate - 0 minutes
                  0m
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 25 minutes
                  25m