How Iteris - a leader in Smart Mobility Infrastructure Management Solutions, upgraded its Digital Platform to Drupal 9

Introduction

One of our most recent website projects was iteris.com, a Nasdaq-listed company that offers Smart Mobility Infrastructure Management solutions. The core of Iteris’ business is delivered through the company’s platform services. Their solutions monitor, visualize and optimize mobility infrastructure around the world. They also help bridge legacy technology silos to unlock the future of transportation. More than 10,000 public agencies and private-sector enterprise users rely daily on this website’s knowledge base and services.

Their Drupal 8 website needed to be upgraded to Drupal 9 to benefit from security updates. We took the opportunity in this process to review unsupported modules and improve four aspects of their website implementation.

 

 

Challenges


Why Upgrade To Drupal 9 from Drupal 8?

  • Drupal 8 is no longer supported by the community and is open to security vulnerabilities
  • Drupal 9 is more stable and is the latest release of all Drupal versions.
  • To be able to access newer capabilities of both Drupal core and contributed modules in Drupal 9.
  • Eliminate custom code, better leverage core and contrib capabilities, and reduce ongoing maintenance costs.
  • Eliminate contrib modules that do not have Drupal 9 versions or contribute towards the Drupal 9 upgrade of such modules.

Our Approach


Zyxware has 16 years of experience effectively delivering migrations from non-Drupal and older Drupal versions to the newest versions of Drupal. Throughout the 50-odd Drupal migration projects we have provided, our focus has been on delivering high-quality code for each aspect of the upgraded application.

Since Drupal 8 released, upgrading to a major version of Drupal is no longer a challenge. The steps for a Drupal 8 to 9 upgrade involve the following:

  • Site audit - We have done a detailed audit of the existing Drupal 8 website to identify the contributed modules that are not supported in Drupal 9 and the deprecated functions used in custom modules. We have also reviewed the changelog for key Drupal versions to ensure the quality of upgrade.
  • Automation - To make the entire upgrade process efficient, tools like Upgrade Status and Rector are used. This will help us identify the issues automatically and partially fix the issues as well.
  • Upgrade - Review the changes made by automated scripts, make the necessary changes manually and enable the contributed modules and custom modules one by one to ensure the smooth upgrade. In some cases, specific modules might require data migration as well. In this case, there was no manual data migration required. 
  • Validation and Testing - The critical test cases for the areas where there are changes in modules are executed once the code is upgraded.

To ensure each project’s sustainability and ongoing maintenance, we always offer clients detailed documentation and support for our work.

The steps above result in an effective upgrade because it ensures  that all security, performance, accessibility, UI, and coding standards are adhered to.


    Solution


    We proposed to upgrade the site to Drupal 9.  A couple of contributed modules did not have Drupal 9 versions. We decided to eliminate the one that was not quite essential and then contribute efforts towards the migration of the other contributed modules that did not have Drupal 9 version. We also proposed to refactor some existing custom code to make it more maintainable in the future. Additional usability improvements were also identified and agreed upon with the client during the discovery process.

    Migration From Drupal 8 To Drupal 9

    Once approved to migrate the website from Drupal 8 to Drupal 9, we analyzed the existing site and prepared a list of features that needed upgrades. These features included: 

    • Upgrade Drupal 8 to Drupal 9.4.3
    • Update the PHP version from 7.2.34 to 7.4.30
    • Ensure that the new website uses best practices, including using composer, the PHP dependency manager
    • Implementing a configuration management setup
    • Ensuring module compatibility with Drupal 9
    • Removing deprecated code
    • Improving the theme to make the website more easily maintainable

    The Upgrade Process

    The following were the high-level steps undertaken for the upgrade of the site.

    Check for unsupported modules:

    Enable the update status module and check for any unsupported modules amongst contributed and core modules installed on the site.

    Composer compatibility:

    Install composer for the Drupal 9 setup so that all contributed modules use this dependency manager. Thanks to this, drupal versions, libraries, and required patches are now better managed. Once composer was installed and working fine, we ran the Drupal updates using composer and upgraded the site to Drupal 9.

    Contributed modules’ compatibility with Drupal 9:

    Two modules needed custom compatibility fixes after migration to Drupal 9. We addressed them individually, separate from the composer update process.

    Custom modules’ compatibility:

    We migrated all deprecated code and functions in custom modules to make them fully compatible with Drupal 9 and the PHP version. In addition to these improvements, we fixed coding-standard issues in accordance with documented best practices.

    Custom theme compatibility:

    We removed the deprecated code and functions from the custom theme.

    • Changing the theme path from themes/iteris to themes/custom/iteris helped the new website follow the Drupal standard for the folder structure within the codebase.
    • We fixed the User Interface (UI) issues by making CSS, SCSS, and javascript changes to make the website more responsive and mobile-friendly.
    • We also improved on using relative/absolute paths within the theme to make it more standardized and maintainable/customizable.

    Database Updates:

    A database update is always required after migration to Drupal’s latest version. This addresses any kind of database level changes between the major versions and also helps in migrating data and config from older structures to newer structures.

    Configuration Management as code:

    • We enabled a method for configuration to be exported and imported whenever changes are made. This has helped in our ability to manage config changes across different environments.
    • The lone Drupal 8 module that did not have a full Drupal 9 release had to be patched to make it fully compatible with Drupal 9. All of the custom features had to be unit tested to ensure that it was all working fine on the newly upgraded website.
    • Other Drupal 8 modules that did have Drupal 9 versions were upgraded directly with the composer.
    • We fixed all the errors and warnings in recent log messages on the website.
    • We also fixed all the errors and warnings on the status report page.
    • We unit tested the website once the upgrade was completed.
    • We fixed all bugs that were raised during our functional testing during our Quality Assurance (QA) process.

    Result


    The site was upgraded to Drupal 9 and all warnings and error messages in the status report were addressed. All custom features were verified to work in the site’s newer version of the site.

    The newly upgraded site has removed all known and unknown Drupal 8 vulnerabilities from the site and has made everything a bit safer for the Iteris team. The site is also more maintainable with a better structure and lesser customizations.

    Moving to composer and code-based configuration management has also helped improve the site’s maintainability. This is expected to reduce ongoing effort required to keep the site updated.

    In addition to the benefits of the upgrade, the site is now easier to use and manage with our improved processes and documentation.

    With all the technical items addressed, the marketing and communications team can  focus their time on the core business needs without worrying about technology.