Preliminary considerations

The primary step to updating opigno_lms to the Drupal 10 version is to prepare the root composer.json and the custom modules for the update.

The best practice notes:

  1. Create a backup of the database

  2. Make sure that your server meets this requirement before you start the upgrade process. The server must use >= PHP 8.1

This manual will describe a brief list of steps.

  1. In your composer.json, update to the latest version, usually ~3.1.0.

  2. As a second step, Opigno LMS and all modules can be updated to >= 3.2.7.

 

Step 1: Prepare for update to the Drupal 10 version

  1. Create a backup of the database and ensure that the PHP version and libraries are up to date and supported by Drupal.

  2. Before updating to OpignoLMS 3.1.3, prepare the drupal/color module for the update. Refer to the Preparing drupal/color module for update section for guidance.

  3. Change "opigno/opigno_lms": "~3.1.0" in require section. OpignoLms 3.1.3 update requires the group module to be updated to version 1.5 so that it can be upgraded to Drupal 10. This change won't affect any existing content and will simplify updating existing sites. Please note that the group entity will become revisionable after the update from version 1.2 to 1.5. While we don't anticipate any issues, it's recommended that you double-check to ensure that the update has been completed properly. 

  4. Resolve all dependencies before upgrading to Drupal 10 and OpignoLms. Note that Opigno_lms >= 3.2.x only supports Drupal 10 (after Drupal 9 became deprecated).

  5. Install the Upgrade Status module to check if the site is ready to update.
    composer require drupal/upgrade_status
    After this, on the page Reports > Upgrade status, you will be able to check what needs to be changed before moving the site to the Drupal 10 version.

    Report example:

    DNXAZK6TPxIUb_Sue9CLuUtAmNQAMfAYZ6Cun_68VhQAS1CkvUx9iDxRs1Ouw4wfpcjKvFsx3TIrkymeHgfEmAjfyoCDXDCOcmre7Gfp0il3b-HJQ5qCE-0ZQlSL13VdOLqGFHB4zpN7.png

    The opigno_lms modules will be updated in a few steps when the version is switched to >=3.2.7

  6. The main issues that need to be fixed:

uyMZV6qRcj33vG06gLuMdtYWDhQdaQff3Cvu_GAYaa5qCWv2oRkBCtElKcnBvvjbk_KIXhP8hUzvatpdtDz15ZDxG03Ur6Cr97staJ6GpAvn9v_ljngdAa1EkoAMmeIuiivebUv1_GVW.png

You need to ensure that:

Example:
$(‘.some-selector’, context).once(‘someOnceClick’).click(...)
needs to be changed to
$(once(‘someOnceClick’, ‘.some-selector’, context)).click(...)

Step 2: Update to Opigno LMS based on Drupal 10

Only after all preparatory work has been completed the switch to the new Opigno LMS based on Drupal 10 can be done.

  1. Uninstall and remove the Upgrade Status module.

  2. Before updating to OpignoLMS 3.2.x, prepare the drupal/color module for the update. Refer to the Preparing drupal/color module for update section for guidance.

  3. Change "opigno/opigno_lms": "~3.1.0" in require section to "opigno/opigno_lms": "~3.2.7".

  4. To the composer.json directory, you need to add an auth.json file. 

  5. Then run the composer update.

  6. When composer update is done, run drush updb -y or use url your-site.com/update.php.

  7. In the end, clear the cache drush cr and do the global testing of all functionality.

 

Troubleshooting

Troubleshooting 1: 

 "extra": {

    "drupal-lenient": {

   "allowed-list": [

      "drupal/some_module",

          "drupal/example_module"

   ]

  },

 

Troubleshooting 2:

Preparing drupal/color module for update:

There are two possible solutions for updating this module:

  1. If the deployments for versions 3.1.3 and 3.2.x are scheduled within the same maintenance window:

  2. If the maintenance windows for the 3.1.3 and 3.2.x deployments differ: