Forums | Mahara Community

Support /
Where are the upgrade manuals?


27 October 2023, 3:49

We have a subscription and received an Email telling us about Mahara 23.04.3 being available.

We have acces to: https://git.mahara.org/catalyst/mahara/-/tree/23.04_STABLE

If you scroll down on that page, you will find a link to: https://wiki.mahara.org/wiki/System_Administrator%27s_Guide/Upgrading_Mahara

However, this manual doesn't work.

We have downloaded all files from https://git.mahara.org/catalyst/mahara/-/tree/23.04_STABLE/htdocs into our public_html. When starting the upgrade proces, this is the failure that we get:

Where do we find the steps to do from here? What does 'run composer install' or 'make initcomposer' mean and where do we go from there?

Kristina Hoeppner's profile picture
Posts: 4740

02 November 2023, 14:12

Hi Richard,

Thank you for pointing out that the composer step is not yet documented on the wiki. We'll add that during our next round of updates.

In the meantime, the error message does tell you what to do: Please run 'composer install' or 'make initcomposer'. That will pull in all necessary libraries. We moved most third-party libraries to be managed by composer to make updating them easier.

Thank you

Kristina

08 November 2023, 9:01

Of course I tried that, but it didn't work.

composer install
Composer could not find a composer.json file in /home/portfodev
To initialize a project, please create a composer.json file. See https://getcomposer.org/basic-usage

So then I thought 'I probably need composer.json as well'. Second try results into this:

composer install
Gathering patches for root package.
Removing package ezyang/htmlpurifier so that it can be re-installed and re-patched.
  - Removing ezyang/htmlpurifier (v4.16.0)
Installing dependencies from lock file (including require-dev)
Verifying lock file contents can be installed on current platform.
Warning: The lock file is not up to date with the latest changes in composer.json. You may be getting outdated dependencies. It is recommended that you run `composer update` or `composer update <package name>`.
Package operations: 1 install, 0 updates, 0 removals
Gathering patches for root package.
Gathering patches for dependencies. This might take a minute.
  - Installing ezyang/htmlpurifier (v4.16.0): Extracting archive
  - Applying patches for ezyang/htmlpurifier
    composer_patches/htmlpurifier.schema.patch (Schema)

In RemoteFilesystem.php line 108:

  [TypeError]
  Composer\Util\RemoteFilesystem::copy(): Argument #1 ($originUrl) must be of type string, null given, called in /home/portfodev/public_html/
  htdocs/vendor/cweagans/composer-patches/src/Patches.php on line 388


Exception trace:
  at phar:///opt/cpanel/composer/bin/composer/src/Composer/Util/RemoteFilesystem.php:108
 Composer\Util\RemoteFilesystem->copy() at /home/portfodev/public_html/htdocs/vendor/cweagans/composer-patches/src/Patches.php:388
 cweagans\Composer\Patches->getAndApplyPatch() at /home/portfodev/public_html/htdocs/vendor/cweagans/composer-patches/src/Patches.php:324
 cweagans\Composer\Patches->postInstall() at phar:///opt/cpanel/composer/bin/composer/src/Composer/EventDispatcher/EventDispatcher.php:200
 Composer\EventDispatcher\EventDispatcher->doDispatch() at phar:///opt/cpanel/composer/bin/composer/src/Composer/EventDispatcher/EventDispatcher.php:142
 Composer\EventDispatcher\EventDispatcher->dispatchPackageEvent() at phar:///opt/cpanel/composer/bin/composer/src/Composer/Installer/InstallationManager.php:410
 Composer\Installer\InstallationManager::Composer\Installer\{closure}() at phar:///opt/cpanel/composer/bin/composer/src/Composer/Installer/InstallationManager.php:425
 Composer\Installer\InstallationManager->executeBatch() at phar:///opt/cpanel/composer/bin/composer/src/Composer/Installer/InstallationManager.php:334
 Composer\Installer\InstallationManager->downloadAndExecuteBatch() at phar:///opt/cpanel/composer/bin/composer/src/Composer/Installer/InstallationManager.php:242
 Composer\Installer\InstallationManager->execute() at phar:///opt/cpanel/composer/bin/composer/src/Composer/Installer.php:786
 Composer\Installer->doInstall() at phar:///opt/cpanel/composer/bin/composer/src/Composer/Installer.php:283
 Composer\Installer->run() at phar:///opt/cpanel/composer/bin/composer/src/Composer/Command/InstallCommand.php:144
 Composer\Command\InstallCommand->execute() at phar:///opt/cpanel/composer/bin/composer/vendor/symfony/console/Command/Command.php:298
 Symfony\Component\Console\Command\Command->run() at phar:///opt/cpanel/composer/bin/composer/vendor/symfony/console/Application.php:1028
 Symfony\Component\Console\Application->doRunCommand() at phar:///opt/cpanel/composer/bin/composer/vendor/symfony/console/Application.php:299
 Symfony\Component\Console\Application->doRun() at phar:///opt/cpanel/composer/bin/composer/src/Composer/Console/Application.php:375
 Composer\Console\Application->doRun() at phar:///opt/cpanel/composer/bin/composer/vendor/symfony/console/Application.php:171
 Symfony\Component\Console\Application->run() at phar:///opt/cpanel/composer/bin/composer/src/Composer/Console/Application.php:139
 Composer\Console\Application->run() at phar:///opt/cpanel/composer/bin/composer/bin/composer:88
 require() at /opt/cpanel/composer/bin/composer:29

install [--prefer-source] [--prefer-dist] [--prefer-install PREFER-INSTALL] [--dry-run] [--dev] [--no-suggest] [--no-dev] [--no-autoloader] [--no-progress] [--no-install] [--audit] [--audit-format AUDIT-FORMAT] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--apcu-autoloader-prefix APCU-AUTOLOADER-PREFIX] [--ignore-platform-req IGNORE-PLATFORM-REQ] [--ignore-platform-reqs] [--] [<packages>...]

So... it just doesn't work. But then... didn't I also read 'make initcomposer'?

Let's try that then.

make initcomposer
make: *** No rule to make target `initcomposer'.  Stop.

No, also doesn't work. And unfortunately another hour of testing was lost.

Kristina Hoeppner's profile picture
Posts: 4740

09 November 2023, 9:58

Hi Richard,

In which directory did you run the command? It needs to be run in the same directory where the Makefile lives, i.e. in the parent directory of the 'htdocs' folder. Robert got the error message when running the command inside 'htdocs' but not when running it in the directory above.

Thank you

Kristina

27 November 2023, 21:19

Are these manuals finished yet?

I just upgraded to the last version and got theme/stylesheet errors. They seem to be missing in the Mahara GIT.

I copied the old ones back, but then the main menu is no longer working.

How to go from here?

Kristina Hoeppner's profile picture
Posts: 4740

28 November 2023, 12:09

Hi Richard,

The 'style' folder is not in the Git repository as it is compiled via the 'make css' command, similar to the 'vendor' directory for which you would run the 'make initcomposer' command in the directory above /htdocs where the Makefile lives. We don't add compiled code to the project repository as that code can change easily and would only bloat the repo. That's why we make download packages available for those that don't want to / can't compile the code as we've always done.

If you do not use Git to manage your code and compile files, but just want to put the contents of the htdocs directory in place, then you would find all files compiled in the 'Releases'. For Mahara 23.04 you do need to ensure to download the appropriate release as there are differences between PHP 7.4 and PHP 8.1.

If you use a custom theme, you'll not get around compiling that unless you create the stylesheet instead of using SCSS.

If you let me know which way you use: a) compiling code or b) just downloading and wanting to put files into place, we can work backwards to give you the steps and once confirmed that there are no extra things, update the documentation.

Thank you

Kristina

28 November 2023, 21:14

Hi Kristina,

For us, the best way is like it has always been with Mahara. Just download 1 file, extract in into public_html and run an upgrade.php or install.php.

We are using many open source applications (Moodle for example being one of them) and it all comes down to this method: one download, extract, visit site and upgrade/install starts.

The way Mahara is deploying now is totally new for us and without any manuals just takes a lot of time to figure out. This also has to do with the size of our organisation. We have a different tech-department. Until now, the E-Learning department could always do everything themselves until we filed for the subscription option, which complicated things for us.

One good thing about it is that we got to know our colleagues at the tech department much, much better.

Kristina Hoeppner's profile picture
Posts: 4740

29 November 2023, 15:02

Hi Richard,

The process of just putting files into place as you seem to have done in the past still works as all the compiled folders and files will come along. I've tested this and followed these steps:

Overwrite existing htdocs folder without deleting files first

  1. Download the directory from the releases. I used the .tar.bz2 file for the version of PHP that I have installed (only applicable to Mahara 23.04 where it's possible to use it with PHP 7.4 or PHP 8.1).
  2. Extract all files and folders.
  3. Copy the 'htdocs' folder into my existing Mahara directory for the site and tell the file manger to overwrite existing files.
  4. Go to my site and perform the upgrade. All themes work.

Caveat: I did get an error message for the Sign-off block during the install process. That is because we moved the functionality in 23.04. By overwriting files in 'htdocs', files that are not needed any more are not deleted and thus might still want to be called. That's standard file copying and is not a problem with Mahara and would happen as well with Moodle and other software.

Therefore, I did another test:

Delete all folders but 'local' and the 'config.php' file in 'htdocs' before copying

  1. Download the directory from the releases. I used the .tar.bz2 file for the version of PHP that I have installed (only applicable to Mahara 23.04 where it's possible to use it with PHP 7.4 or PHP 8.1).
  2. Extract all files and folders.
  3. In my Mahara directory, go into the 'htdocs' folder and delete all folders but 'local' and all files but 'config.php'. The 'local' folder contains customisations that are not overwritten by the Mahara repository. The 'config.php' also doesn't come along from the repository and thus needs to be retained. If you have a custom theme, you may also wish to keep that folder if it's not in the 'local' folder.
  4. Copy everything from the 'htdocs' folder from the just downloaded zip archive into place in my site.
  5. Run the upgrade. Site works and doesn't show any error message.

Doing it this way, you can guarantee that no old files are retained that might interfere. However, if you customised core files in Mahara, the deletion process becomes more arduous. That's why all customisations should sit in the 'local' folder.

Managing the repository by Git helps manage merge processes more transparently and resolve them instead of needing to keep separate documentation of all changes that would then need to be put into place again.

If the above steps do not work for you, please provide details so we can try to replicate the issue.

Thank you

Kristina

 

29 November 2023, 22:43

@Kristina,

Could you verify if your main menu top right is working after upgrade?

We have done this proces several times. You can also test this with 24.04dev and we noticed that the menu top right was no longer working as files weren probably changed or replaced.

Kristina Hoeppner's profile picture
Posts: 4740

01 December 2023, 14:39

Hi Richard,

Yes, the menu is working.

Cheers

Kristina

10 results