Need help with Drupal or Grav admin, site building, design, or content? Contact us! 

Help Defend Democracy! → Join Battalion today.

Back to top with progress scrollbar

Retrofit or Backdrop CMS: Which savior should the damned on Drupal 7 sites turn to?

By Reuben Walker, 11 July, 2023
Illustration of death walking through a field of fire

Retrofit has opened an easier path to upgrading from Drupal 7. And Backdrop CMS offers an option for those who refuse modern Drupal in their life but require a solid off-ramp.

I have had harsh words in the past for sinful sites refusing to upgrade from Drupal 7. And for wishy-washy Drupal leadership that repeatedly backslides from ending support for it.

But fear not, ye doomed and damned denizens of Drupal 7 misery, a savior is at hand. Stretch out your wretched arms and embrace salvation before death drags you down to the fires of website hell. 😈

All metaphors aside, recently Matt Glaman has done the Drupal community a huge service by doing Drupal’s job for it. And by removing excuses for lazy, incompetent, or poorly-funded Drupal 7 site masters not to upgrade.

Just before DrupalCon Pittsburg he saved the Drupal 7 universe by creating Retrofit. As a consequence of that Drupal backslid on the end of life for 7 one final time.

Why to finally get the fuck off 7

But before we review it, let’s look at why you should upgrade from 7 to Drupal 9 or 10. Although we shouldn’t have to.

The umpteenth postponement of Drupal 7 EOL isn’t a complete one

Drupal 7 is no longer getting as much love as it did after previous EOL postponements. That means the security and performance of your Drupal 7 website might not be ship-shape, even if it’s on the latest version of 7.

Going forward, only the high-risk security issues are getting fixed, while the low to medium risk ones might be ignored.

End-of-life software sometimes requires components that aren't secure, which will also increase your risk.

I did not know this but, your site could be flagged as insecure by security vulnerability scanners. Security frameworks (PCI_DSS, FedRAMP, FISMA) forbid end-of-life software.

Plus, some of the modules for Drupal 7 are already dead.

Other issues and what you can temporarily do

Starting August 1, 2023, any Drupal 7 contributed modules or themes that are marked as unsupported can't become supported again. That means no more security advisories for any unsupported libraries that Drupal 7 contributed modules or themes rely on.

If you or your clients depend on a D7 module or theme, think about maintaining it before it's flagged as unsupported due to unresolved issues.

Also on August 1st, the Drupal security team might invite the open source community to help resolve non-critical Drupal 7 issues. They might not. These issues will be chosen based on risk levels. Only issues that can't be mass-exploited will be shared publicly.

If you're running a Drupal 7 site, keep an eye on the public issue queue and see if you can help resolve any issues that may affect you.

PHP 5.5 and below will no longer be supported starting July 1, 2023. The Drupal security team will only release patches for PHP 5.6 and above.

Why are you on PHP 7 much less 5? End your slothful ways and update to PHP 8 as soon as possible.

Windows will no longer be tested, and security issues that are specific to running a Drupal 7 on Windows will no longer be fixed.

Linux anyone?

Finally, Drupal will no longer support tasks related to Drupal 7. These include documentation, navigation, automated testing, and packaging. Unfortunately, there is nothing you can do about this.

You should have FOMO

Also, without access to the great new functionality being added to later versions of Drupal, your site will become less valuable to your audience.

Competitors have moved on to higher versions, like Drupal 10. By clinging to Drupal 7, you're putting yourself at a disadvantage. The newer versions have lots of beneficial features you're missing out on.

They include:

Better security and performance

Obviously the majority of minor updates are base on these two aspects of any platform.

Better content publishing

Starting with Drupal 9, Layout Builder that made creating custom pages easier. You can drag and drop elements, which is more intuitive. This work is continuing and improving with 10.

And the media module makes it easier to manage your media.

Plus, if you upgrade to Drupal 10, you get the latest CKEditor 5, which has new features like auto-formatting. Better yet, you can use the Gutenberg module.

API-first approach

Drupal 8 and up are all about the API-first approach. That means you can integrate with other third-party systems fairly easily.

Accessibility features

Newer versions of Drupal have lots of features that make your content accessible to people with disabilities. Things like speech-to-text and screen magnification are just the beginning. Obviously, this is a huge item of concern.

It’s not just Drupal 7 sites at risk

DevOps is impacted by the end of 7 as well. Who knew?

I just learned about Aegir as well. It’s a hosting system that works with a LAMP or LEMP server to create, deploy and manage Drupal sites.

It says:

“The Drupal community has long enjoyed the benefits of a robust, open-source tool in the form of Aegir for the secure and efficient management of their web applications. However, the impending End-Of-Life (EOL) for Drupal 7, which underpins the current version of Aegir, is casting a shadow on this reliable tool. With the EOL, Aegir3 will also sunset, leaving a gap in the market for a community-owned, open-source hosting solution.

This situation presents us with an urgent need to create a modern alternative that is not only reliable but also doesn’t require one to be a DevOps expert to operate. The community needs a tool that can support the transition to Drupal 10 sites, while also accommodating non-Drupal sites.”

So, there is that. They are creating Aegir 5 and it won’t work with Drupal 7. More misery is headed your way.

OK, let’s finally move on the solutions to this dilemma and the topic of this article. We begin with Retrofit.

Icon of crossed hammer and wrench representitive of retrofit

Retrofit

Regarding the motivation for Retrofit, its architect, Matt Glaman says:

“Upgrading from Drupal 7 is a heavy lift. The way we define things – routes, blocks, user permissions – was changed. Even if the custom code isn't dramatic, the number of lines that need to be touched is. Design paradigms changed. We adopted Symfony, Guzzle, and other packages. While I believe this was for the best, we never provided a backward compatibility layer to bridge Drupal 7 code to Symfony-based Drupal.”

Retrofit is a backward compatibility layer that allows Drupal 10 to run a modified Drupal 7 site. You still have to migrate some things to 10, but it’s fewer items than without Retrofit.

Again to quote Matt:

“What if a backward compatibility layer was available to Drupal 7 sites? What if you could copy and paste your Drupal 7 modules into Drupal 10? What if your code just worked, or you only need to refactor 30% of it versus 98%?”

That’s the promise of Retrofit. It buys you time to gradually migrate and refactor your site.

Retrofit can help your Drupal 7 site with core, your custom code, contributed modules, and more.

After you migrate, Drupal's core will come from Drupal 10. Your site will now receive updates and patches to core just like any Symfony-based Drupal site. Comparatively, it will be simplicity to update to new Drupal versions in the future. Especially, if auto updates ever arrive. ;)

Retrofit translates calls to Drupal 7 into calls to Drupal 10. So, you are good to go.

In Drupal 7, custom code could reside in custom modules, in PHP template files, or strangely even in the database if the PHP module is used. With Retrofit, calls to Drupal core should translate. However, careful work will be required to ensure the code works as designed. Test, test, and test, peeps.

Obviously, contributed modules make calls to Drupal core. Retrofit can translate them as well.

And they also depend on the Drupal 7 database. If the database structure doesn't change, contributed modules should work with minor if any changes.

The Technical Details

Retrofit is a Composer package that you just add to your codebase.

composer require mglaman/retrofit-drupal

Retrofit is a work in progress, but according to Matt it currently provides:

  • Conversion of hook_menu into routes, menu links, local tasks, and actions
  • Conversion of hook_permissions definitions
  • Global $user replacement
  • Form building, validation, and submission via drupal_get_form routes.
  • Convert hook_block to block plugin definitions

He continues:

There still are a lot of hard problems to figure out:

  • Field values were accessed via arrays in Drupal 7, and the new Field API does not implement \\ArrayAccess.
  • Database tables have changed so that queries will break. For instance SELECT nid FROM {node} n WHERE n.type = :type needs to be SELECT nid FROM {node_field_data} n WHERE n.type = :type.
  • Items once defined in code but are now configuration entities – note types, view modes, etc.

Even if those problems cannot be solved, the current coverage and support reduce a lot of boilerplate refactoring that would be required.

Visit the repository on GitHub for the nitty-gritty.

And I am sure Matt would love it if you want to contribute.

Core Drupal and three modules can do much of the heavy lifting for your migration before you even get to Retrofit. Chromatic explains in this article -> Migrating Drupal 7 to Modern Drupal in 2023.

ATK

Automated Testing Kit is a Drupal module that can ease your migration when using Retrofit. It’s a Drupal-specific set of tests and functionality that help you write automated tests. ATK is new as well, but it is growing.

To make the most out of this module, start the Retrofit migration by writing tests for your existing site. Depending on the size of your site, between 50 and 500 tests may be needed to ensure that each part is ready for migration. Hopefully, it’s closer to fifty. ;) The benefit is that the tests will confirm there are no bugs in your existing site. That’s good, even if you don’t upgrade and move to Backdrop instead.

As the migration gradually progresses, periodically run the test suite. If there is a problem, a test will fail, and you will know where to look.

Remember the goal of Retrofit is to let you gradually migrate your site. When all the tests pass, it is ready for Drupal 10.

Again, now your site has complete end-to-end testing set up to help ensure ongoing quality even if you don’t migrate to 10 and chose Backdrop.

Retrofit is the shit

So if you are stuck on Drupal 7 and want a modern website, Retrofitting is the way. Get busy saving your site(s) soul/core, and buy Matt Glaman a drink the next time you see him.

Finally, Matt has a demo of Retrofit on YouTube.

And

A DrupalEasy podcast features an interview with Matt Glaman. Transcript They discuss Retrofit about 6 minutes in.

Dragon that is the mascot for Backdrop CMS.

Fall back to Backdrop CMS

Backdrop CMS offers an option for those who refuse to modernize their Drupal 7 site but require a solid off-ramp. It also has a cool mascot. ;)

According to Backdrop it’s “a free and Open Source Content Management System that helps you build modern, comprehensive websites for businesses and non-profits.

Backdrop is a fork of the Drupal project and is an excellent alternative. These two projects have different goals today, but have a shared history.”

It is mostly D7

At its core Backdrop is still Drupal 7. But it’s community has made hundreds of refinements. It includes modern functionality like a powerful layout system, and state-of-the-art configuration management. And Backdrop CMS is faster than 7.

Backdrop CMS is not a brand new product. It’s been around a while and, again is an evolution of the Drupal 7 software, with enhancements for website architects and content editors. It has been out for over eight years and has a proven track record of on-time releases.

Fortunately for you, Backdrop CMS has a built-in upgrade path from Drupal 7. Critically, it can run on the same database, so customizations you've made to your Drupal 7 site will not be lost when you migrate to Backdrop. Plus, over seventy Drupal 7 contributed modules are included in Backdrop core.

Finally Backdrop has a small, active, and dedicated community. They aren’t going to disappear on you.

Learn more

Learn more about this Drupal alternative for websites.

Check out a case study. It also lists some advantages of migrating to Backdrop versus staying on 7:

  • Backdrop relieves the pressure and uncertainty of Drupal 7's looming End of Life.
  • As mentioned above out of the box improvements in Backdrop come with the upgrade - accessibility, performance, usability, etc.
  • Drupal 7 themes can be conceptually split into layout and theme, and the current theme replicated, refreshed, or replaced. Which is very innovative.
  • Also as mentioned above, configuration management provides enormous benefits in the upgrade process.
  • The relative smoothness of a direct upgrade path (compared with a migration) can leave extra room in the budget for other improvements as follow-ups. This is a fair point.
  • Content can be consolidated and terms reworked or merged after the upgrade.

Backdrop also has specific documentation to migration from 7 that is helpful.

Catch the rest of the documentation with the Backdrop CMS User Guide.

There is even a book on migrating, Migrating from Drupal to Backdrop! That’s impressive, but try to find it somewhere other than Amazon.

Finally, there is a forum so you can talk to other Drupal 7 refugees.

Illustration of a slightly cute / slightly evil devil.

Get migration religion

If you made it this far, you’ve seen it’s Come to Jesus time for migrating your Drupal 7 site(s). Repent from the sins of ignorance and sloth.

Otherwise, you will end up in website hell with the demon pictured above. He looks like he stinks and is pissed off to see you. So save your site’s soul (core) before it’s too late.

If you are stuck on a legacy Drupal mindset, Backdrop is a solid and better version of 7’s user experience.

Even if you migrate to WordPress with the new collaboration phase coming to its development, do something.

In my opinion, you should thank your good or lucky karma that Matt Glaman created Retrofit. And start migrating with it. And be sure to thank him for saving your ass and reincarnating your site(s) the next time you see him. ☸️

It’s not too late for salvation and avoiding the hell fires of Drupal 7 end of life. 😈 Don’t delay, act today.

Know that serenity awaits the followers of modern, Symfony-based Drupal. ☯️

Namah te and pardon the fire and brimstone sermon from a back-sliden Southern Baptist. 😉

section separator
Article Type
Donate using Liberapay

Symfony Station covers the essential news in the Symfony, PHP, and Fediverse development communities with a focus on protecting democracy. Please use the button above to make a small donation to help cover our out-of-pocket costs. Our labor is provided free of charge to support the communities we write about.

Join our newsletter list

Subscribe to The Payload, our weekly newsletter exploring the Symfony Universe.

  Start exploring!