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

Install fails for renamed admin folder

    XMLWordPrintable

Details

    • MOODLE_35_STABLE
    • MOODLE_35_STABLE
    • MDL-61766-master
    • 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.
    • 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.

    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

              jpataleta Jun Pataleta
              jpataleta Jun Pataleta
              Tim Hunt Tim Hunt
              Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
              Janelle Barcega Janelle Barcega
              David Woloszyn, Huong Nguyen, Jake Dallimore, Michael Hawkins, Stevani Andolo, David Woloszyn, Huong Nguyen, Jake Dallimore, Michael Hawkins, Stevani Andolo, Matteo Scaramuccia, David Woloszyn, Huong Nguyen, Jake Dallimore, Michael Hawkins, Stevani Andolo
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                17/May/18

                Time Tracking

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