Articles


How to fix the Drupal 10 upgrade Config Split issue

How to fix the Drupal 10 upgrade Config Split issue



Posted by admin ,20th May 2024

The upgrade to Drupal 10 has been progressing well, with the new version nearing completion. However, during our testing phase, a glitch was detected: the Drupal Config Split module failed to function as expected. Fortunately, in our case, this issue only resulted in a minor gap in our Google Analytics data. Yet, for other businesses and organizations, such a seemingly minor hiccup could lead to more severe consequences. Imagine scenarios where your website fails to display current content accurately, where development modules that degrade the user experience are inadvertently left active, or worst-case scenario, where crucial payment processes are disrupted. As Drupal 9 reached its end-of-life milestone in November 2023, we were proactive in transitioning our sites to Drupal 10. Embracing a philosophy of continuous learning, this transition period presented us with a valuable opportunity to gather insights and lessons that would prove beneficial when updating our client's platforms to Drupal 10.

Troubleshooting tips for fixing Drupal 10 upgrade Config Split issue

In Drupal 10, Google Analytics has some issues and thankfully we now know how to fix it! Here’s how.

How to use Drupal Config Split on your websites

Drupal's Configuration Management feature plays a critical role in overseeing the administrative settings that dictate the functionality of a website powered by Drupal. Enhancing this capability, the Drupal Config Split module emerges as a valuable extension by enabling users to segregate configurations based on diverse circumstances or platforms. This module's functionality depends on companion modules such as Config ignore and Config Filter, essential components that extend beyond Drupal Core and necessitate manual installation and maintenance to ensure operational efficiency. With the combined assistance of these modules, Drupal administrators can effectively streamline the management processes and optimize the performance of their Drupal-powered websites, making them more robust and adaptable to various operational requirements.

On your websites, use Drupal Config Split to separate out different settings for Google Tag Manager (GTM):

Non-production / local sites: GTM is not available at all in local environments.

Staging sites: are utilizing a staging GTM environment instead of the same GTM container as on live, which enables us to test GTM settings and any changes before deploying them to the live environment.

Production / Live Sites: The primary live GTM container is always on.

In our extensive experience working on Drupal client sites, we consistently observe that Config Split plays a vital role in intricate scenarios. By being implemented in various sophisticated ways, it significantly contributes to detecting and addressing potential challenges at an early stage, thus enhancing the overall efficiency and effectiveness of the development process.

Deploying the Drupal 10 upgrade to production

Upon completing the upgrade of Drupal 10 to the production environment, an unexpected obstacle arose: the tracking of traffic by Google Analytics was not functioning as intended. This issue stemmed from the fact that the live and production environments were mistakenly identified as 'local'. The root cause was traced back to Config Split, which failed to activate Google Tag Manager (GTM) on the live site, resulting in the loss of GA tracking temporarily. To rectify this discrepancy, a manual intervention was required to enable the configuration on the production environment, swiftly restoring the functionalities of both GTM and GA. This incident highlighted a specific glitch within the Drupal Config module that impacted the consistent application of settings across various environments, showcasing the critical importance of meticulous configuration management in web development and maintenance activities.

Finding a permanent is a definite fix for the Drupal Config Split issue

In our examination of the Config Split, Config Ignore, and Config Filter modules, we discovered their high level of interdependence. Consequently, we decided to delve into the availability of known patches to enhance their functionality. It was observed that by updating Config Split along with its dependencies, automatic upgrades to the latest 1.x version of config_filter were facilitated. Notably, this incorporation took effect in version 1.6 starting from August 19, 2020. As of the Drupal 10 upgrade period, the most recent version available was 1.7. This progression underscores the vital relationship between these modules and highlights the significance of keeping them up to date for optimal performance and compatibility.

Summary and Major takeaways

In conclusion, during our transition to Drupal 10, an oversight occurred when we failed to update the dependencies within the Config split module. This failure to synchronize the upgrades resulted in the Config Split module no longer operating as expected within our system, particularly due to the absence of a strict version requirement in config_split for config_filter, necessitating a version of 1.6 or higher for compatibility.

A significant lesson learned from this scenario is the importance of meticulous attention to detail when contemplating the migration from Drupal 9 to 10. It is crucial to meticulously examine the version compatibility of your Config Filter modules, ensuring that they meet the requisite version of 1.6 or above. Additionally, the comprehensive testing of your Config settings across all environments is strongly advised to pre-empt any potential complications that may arise during the upgrade process.