Drupal blog: How to prepare for Drupal 9

This blog has been re-posted and edited with permission from Dries Buytaert’s blog.

Upgrading from Drupal 8 to Drupal 9 should be easy if you regularly check for and remove the use of deprecated code.

With Drupal 9 targeted to be released in June of 2020, many people are wondering what they need to do to prepare.

The good and important news is that upgrading from Drupal 8 to Drupal 9 should be really easy — radically easier than upgrading from Drupal 7 to Drupal 8.

The only caveat is that you need to manage “deprecated code” well.

If your site doesn’t use deprecated code that is scheduled for removal in Drupal 9, your upgrade to Drupal 9 will be easy. In fact, it should be as easy as a minor version upgrade (like upgrading from Drupal 8.6 to Drupal 8.7).

What is deprecated code?

Code in Drupal is marked as “deprecated” when it should no longer be used. Typically, code is deprecated because there is a better alternative that should be used instead.

For example, in Drupal 8.0.0, we deprecated Drupal::l($text, $url). Instead of using Drupal::l(), you should use Link::fromTextAndUrl($text, $url). The Drupal::l() function was marked for removal as part of some clean-up work; Drupal 8 had too many ways to generate links.

Deprecated code will continue to work for some time before it gets removed. For example, Drupal::l() continues to work in Drupal 8.7 despite the fact that it was deprecated in Drupal 8.0.0 more than three years ago. This gives module maintainers ample time to update their code.

When we release Drupal 9, we will “drop” most deprecated code. In our example, this means that Drupal::l() will not be available anymore in Drupal 9.

In other words:

  • Any Drupal 8 module that does not use deprecated code will continue to work with Drupal 9.
  • Any Drupal 8 module that uses deprecated code needs to be updated before Drupal 9 is released, or it will stop working with Drupal 9.

If you’re interested, you can read more about Drupal’s deprecation policy at https://www.drupal.org/core/deprecation.

How do I know if my site uses deprecated code?

There are a few ways to check if your site is using deprecated code.

If you work on a Drupal site as a developer, run drupal-checkMatt Glaman(Centarro) developed a static PHP analysis tool called drupal-check, which you can run against your codebase to check for deprecated code. I recommend running drupal-check in an automated fashion as part of your development workflow.

If you are a site owner, install the Upgrade Status module. This module was built by Acquia. The module provides a graphical user interface on top of drupal-check. The goal is to provide an easy-to-use readiness assessment for your site’s migration to Drupal 9.

If you maintain a project on Drupal.org, enable Drupal.org’s testing infrastructure to detect the use of deprecated code. There are two complementary ways to do so: you can run a static deprecation analysis and/or configure your existing tests to fail when calling deprecated code. Both can be set up in your drupalci.yml configuration file.

If you find deprecated code in a contributed module used on your site, consider filing an issue in the module’s issue queue on Drupal.org (after having checked no issue has been created yet). If you can, provide a patch to fix the deprecation and engage with the maintainer to get it committed.

How hard is it to update my code?

While there are some deprecations that require more detailed refactoring, many are a simple matter of search-and-replace.

You can check the API documentation for instructions on how to remedy the deprecation.

When can I start updating my code?

I encourage you to start today. When you update your Drupal 8 code to use the latest and greatest APIs, you can benefit from those improvements immediately. There is no reason to wait until Drupal 9 is released.

Drupal 8.8.0 will be the last release to deprecate for Drupal 9. Today, we don’t know the full set of deprecations yet.

How much time do I have to update my code?

The current plan is to release Drupal 9 in June of 2020, and to end-of-life Drupal 8 in November of 2021.

Contributed module maintainers are encouraged to remove the use of deprecated code by June of 2020 so everyone can upgrade to Drupal 9 the day it is released.

A timeline with important dates and future milestones

Drupal.org project maintainers should keep the extended security coverage policy in mind, which means that Drupal 8.8 will still be supported until Drupal 9.1 is released. Contributed projects looking to support both Drupal 8.8 and Drupal 9.0 might need to use two branches.

How ready are the contributed modules?

Dwayne McDaniel (Pantheon) analyzed all 7,000 contributed modules for Drupal 8 using drupal-check.

As it stands today, 44% of the modules have no deprecation warnings. The remaining 56% of the modules need to be updated, but the majority have less than three deprecation warnings.

Kanopi Studios: Thank you DrupalCon Seattle

Another amazing DrupalCon has passed, and Kanopi had a great time collaborating with the community. Kanopians gave three talks, hosted one summit, participated in two others, led first-time contributor workshops, hosted three BOFs, and two of our engineers (Sean and Jim) passed their Acquia certifications. Our boss Anne even made her first commit.

If you missed our talks, fear not. The recordings are below:

Deep Cleaning: Creating Franchise Model Efficiencies with Drupal 8 

Presenters: Anne Stefanyk and Katherine White

COIT offers cleaning services and 24/7 emergency restoration services and their 100+ locations serve more than 12 million homes & businesses across the United States and Canada. But their own website was a huge mess. In this case study we will cover the more technical parts of this Drupal 8 implementation.

How to Work Remotely and Foster a Happy, Balanced Life

Presenters: Anne Stefanyk

In this session, we talk about how to be the best remote employee, and provide strategies and ideas if you are a leader of a remote team. We talk about key tactics to keep you (and all other staff) inspired, creative, productive and most importantly, happy!

The post Thank you DrupalCon Seattle appeared first on Kanopi Studios.

CiviCRM Blog: civicrm_engage is dead, long live civicrm_engage!

Long, long ago, before we had indoor plumbing, penicillin or `civix generate:module`, a humble drupal module was born.

It tried its best to be helpful by employing an (at the time) cutting edge technique known as CRM_Utils_Migrate_Import to dump a motley collection of custom fields, profiles and options into your CiviCRM database.

Along with other cutting edge techniques (such as lobotomies), the process of automatically adding custom fields, profiles and options has been improved and now can be done with managed entities and our lovely api.

The Progressive Technology Project helped bring about civicrm_engage, and has now prepared a series of much more sane alternatives that provide the same functionality, but are implemented using CiviCRM-native extensions that employ the CiviCRM API.

The replacement extensions are described below.

In addition civicrm_engage provided a few demographic fields and then did some magical foo on the display of the custom demographics fields so that they would appear on the summary page in the same box as the core demographics fields. This is pretty, but alas, we decided it was not worth the extra work of maintaining said magical foo so we have not tried to re-implement that feature.

So, with this blog post, we are starting the process of deprecating civicrm_engage.

NOTE: If you are currently using civicrm_engage, you can simply disable and uninstall the module and your custom fields, profiles and options will remain. Your custom demographic fields will suddenly appear as a Tab instead of being available in your core demographics box, but otherwise, everything will work the same. Disabling and uninstalling civicrm_engage is the recommended course of action for existing installations.

For new installations, please see the replacement extensions below.

Feedback and questions are welcome from anyone (but especially people that actually have civicrm_engage enabled, if any of you exist).

Replacement extensions:

  • Contstituent Fields: Provides a custom data group for both individuals and organizations that includes a contstituent type multi-select for both individuals and organizations. It also includes a handful of useful custom fields for organizing purposes, such as “Staff resopnsible”, “Date started”,  “Languages known” and others.
  • Participant Fields: Provides common fields for organizing events that extend the participant records, such as “Dietary Preferences” and “Child care needed.”
  • Media Fields: Provides both a media outlet and media contact sub types (extending Organization and Individual) along with fields for tracking such sub types.
  • Voter Fields: Provides a set of fields for tracking voter engagement, including “Party Registration,” “VAN Id” and others.
  • Foundation Fields: Creates a Foundation Organization sub type along with useful fields for tracking Foundations. In addition, provides a “letter of inquiry,” “proposal,” and “report” activity types and custom activity fields to help you track proposals.
  • Turnout:   Provides extra fields that extend the participant records that are    used for tracking turnout efforts. These fields (and a profile)    provide a turnout workflow allowing organizers to make up to three    calls to propsective event participants and track what their    responses to the calls are.

 

Chromatic: DrupalCon 2019 Seattle Recap

Another DrupalCon is in the books and our team had a fantastic time gathering with so many members of the worldwide Drupal community in Seattle. Getting together in person with a large portion of our team is always a treat, but it makes it all the sweeter when our team has the chance to share their expertise by presenting at DrupalCon.

Srijan Technologies: DrupalCamp London 2019

On the evolution of web content approaches and technology perspectives

Change is in the air!

In more ways than one, our world is in the throes of change. We live in an era where politics and governance, economy and international relations as also business and technology are all careening through an edge-of-the-seat roller coaster ride, from one ‘cutting edge’ to another.

Ideas, values, systems, processes, frameworks – what held good yesterday is today up in the air. We see this in our lives – professional and personal. We seek the new constantly, be it a new Mar-Tech platform every few months for our businesses, or a new Soc-Med channel to post our holiday pictures on, discarding the one that was ‘trusted’ till yesterday.

Not surprisingly, this affects both organizations and individuals – the changes in our experience of institutional frameworks, business models, corporate ethics, interpersonal relationships, the way we shop, eat, dress, travel, even our experiences of climate change.

KatteKrab: Now migrated to Drupal 8!

Now migrated to Drupal 8!

Drupal 8

kattekrab
Sat, 20/04/2019 – 22:08

It was easy!

Ok – I did have help from cafuego, so there’s some bits of the process that were just magic to me.  But once I had access to the environments, I enabled the migrate modules, and followed instructions on drupal.org and hey presto it was done!

I did need to do manual clean up – re position blocks into differently named regions, and recreate some menu items for taxonomy.

I also got stumped for a bit about why I could no longer free tag, but that turned out to be a simple setting change.

There’s still some tweaking to do, and I know that the path to files has changed, so there’s lots of broken images I need to tidy up, but other than that, all seems well.

During his keynote at DrupalCon a couple of weeks back, Dries said the time to move to D8 is now.

He’s right.

Community Working Group posts: 2019 Aaron Winborn Award Winner: Leslie Glynn

Leslie Glynn - 2019 Aaron Winborn Award winnerDuring the opening plenary at DrupalCon Seattle, the members of the Drupal Community Working Group announced the winner of the 2019 Aaron Winborn Award, Leslie Glynn (leslieg).

The award is named after a long-time Drupal contributor who lost his battle with ALS in 2015. This award recognizes an individual who, like Aaron, demonstrates personal integrity, kindness, and an above-and-beyond commitment to the Drupal project and community. Previous winners of the award are Cathy Theys, Gabór Hojtsy, Nikki Stevens, and Kevin Thull. Current CWG members, along with previous winners, selected the winner based on nominations submitted by Drupal community members.

This year, there were 18 individuals nominated for the award. In the coming weeks, the CWG will be contacting all nominees to let them know of their nomination and thank them for their continued work in the community.

In addition to the physical award presented to Leslie during the announcement, Leslie was also provided with a free ticket to DrupalCon Seattle as well as travel expenses. 

Leslie has over 30 years experience in the software development field and has been working with Drupal since 2011. She has been involved in Drupal project management, site building, and client support. She has organized and mentored Drupal sprints, has offered trainings at Drupal camps and DrupalCons, and has volunteered at – as well as help organize – many camps across the United States especially in New England.

Multiple people nominated Leslie for this award. One of them wrote, “If you have ever attended a North American Drupalcon, BADCamp, NYCCamp, NEDCamp, Design4Drupal, or any other major North American Drupal event, then you have seen Leslie. She is a constant inspiration of how our community, and each one of us, should work and act.”

Another one of her nominators wrote, “Leslie is a dependable, passionate, kind, and giving individual and the Drupal community is extremely fortunate to have her.”

Nominations for the 2020 award will open in early 2020.

Mass.gov Digital Services: Our DrupalCon 2019 Recap

DrupalCon 2019 Recap

What we learned from our fellow Drupalists

On April 7th, our team packed up our bags and headed off to Seattle for one of the bigger can’t miss learning events of the year, DrupalCon.

“Whether you’re C-level, a developer, a content strategist, or a marketer — there’s something for you at DrupalCon.” –https://events.drupal.org/

As you may have read in one of our more recent posts, we had a lot of sessions that we couldn’t wait to attend! We were very excited to find new ideas that we could bring back to improve our services for constituents or the agencies we work with to make digital interactions with government fast, easy, and wicked awesome. DrupalCon surpassed our already high expectations.

GovSummit

At the Government Summit, we were excited to speak with other state employees who are interested in sharing knowledge, including collaborating on open-source projects. We wanted to see how other states are working on problems we’ve tried to solve and to learn from their solutions to improve constituents’ digital interactions with government.

One of the best outcomes of the Government Summit was an amazing “birds of a feather” (BOF) talk later in the week. North Carolina’s Digital Services Director Billy Hylton led the charge for digital teams across state governments to choose a concrete next step toward collaboration. At the BOF, more than a dozen Massachusetts, North Carolina, Georgia, Texas, and Arizona digital team members discussed, debated, and chose a content type (“event”) to explore. Even better, we left with a meeting date to discuss specific next steps on what collaborating together could do for our constituents.

Session Highlights

The learning experience did not stop at the GovSummit. Together, our team members attended dozens of sessions. For example, I attended a session called “Stanford and FFW — Defaulting to Open” since we are starting to explore what open-sourcing will look like for Mass.gov. The Stanford team’s main takeaway was the tremendous value they’ve found in building with and contributing to Drupal. Quirky fact: their team discovered during user testing among high-school students that “FAQ” is completely mysterious to younger people: they expect the much more straightforward “Questions” or “Help.”

Another session I really enjoyed was called “Pattern Lab: The Definitive How-to.” It was exciting to hear that Pattern Lab, a tool for creating design systems, has officially merged its two separate cores into a single one that supports all existing rendering engines. This means simplifying the technical foundation to allow more focus on extending Pattern Lab in new and useful ways (and less just keeping it up and running). We used Pattern Lab to build Mayflower, the design system created for the Commonwealth of Massachusetts and implemented first on Mass.gov. We are now looking at the best ways to offer the benefits of Mayflower — user-centeredness, accessibility, and consistent look and feel — to more Commonwealth digital properties. Some team members had a chance to talk later to Evan Lovely, the speaker and one of the maintainers of Pattern Lab, and were excited by the possibility of further collaboration to implement Mayflower in more places.

There were a variety of other informative topics. Here are some that my peers and I enjoyed, just to name a few:

A Day in the Exhibit Hall

Our exhibit hall booth at DrupalCon 2019
Talking to fellow Drupalists at our booth

On Thursday we started bright and early to unfurl our Massachusetts Digital Service banner and prepare to greet fellow Drupalists at our booth! We couldn’t have done it without our designer, who put all of our signs together for our first time exhibiting at DrupalCon (Thanks Eva!)

It was remarkable to be able to talk with so many bright minds in one day. Our one-on-one conversations took us on several deep dives into the work other organizations are doing to improve their digital assets. Meeting so many brilliant Drupalists made us all the more excited to share some opportunities we currently have to work with them, such as the ITS74 contract to work with us as a vendor, or our job opening for a technical architect.

We left our table briefly to attend Mass.gov: A Guide to Data-Informed Content Optimization, where team members Julia Gutierrez and Nathan James shared how government agencies in Massachusetts are now making data-driven content decisions. Watch their presentation to learn:

  1. How we define wicked awesome content
  2. How we translate indicators into actionable metrics
  3. The technology stack we use to empower content authors

The Splash Awards

To cap it off, Mass.gov, with partners Last Call Media and Mediacurrent, won Best Theme for our custom admin theme at the first-ever Global Splash awards (established to “recognize the best Drupal projects on the web”)! An admin theme is the look and feel that users see when they log in. The success of Mass.gov rests in the hands of all of its 600+ authors and editors. We’ve known from the start of the project that making it easy and efficient to add or edit content in Mass.gov was key to the ultimate goal: a site that serves constituents as well as possible. To accomplish this, we decided to create a custom admin theme, launched in May 2018.

A before-and-after view of our admin theme

Our goal was not just a nicer looker and feel (though it is that!), but a more usable experience. For example, we wanted authors to see help text before filling out a field, so we brought it up above the input box. And we wanted to help them keep their place when navigating complicated page types with multiple levels of nested information, so we added vertical lines to tie together items at each level.

Last Call Media founder Kelly Albrecht crosses the stage to accept the Splash award for Best Theme on behalf of the Mass.gov Team.
All the Splash award winners!

It was a truly enriching experience to attend DrupalCon and learn from the work of other great minds. Our team has already started brainstorming how we can improve our products and services for our partner agencies and constituents. Come back to our blog weekly to check out updates on how we are putting our DrupalCon lessons to use for the Commonwealth of Massachusetts!

Interested in a career in civic tech? Find job openings at Digital Service.
Follow us on Twitter | Collaborate with us on GitHub | Visit our site


Our DrupalCon 2019 Recap was originally published in Massachusetts Digital Service on Medium, where people are continuing the conversation by highlighting and responding to this story.

Specbee: Is Drupal 8 the secret weapon for your Multilingual Website?

As the internet continues to grow, more people around the world are getting familiar with it, and this means just one thing. If you need to internationalize your business for better revenue, you need to go multilingual! For most of the CMS tools, non CMS languages and frameworks, creating a multilingual website is a challenging task with numerous pain points. However, thankfully, this is not the case with Drupal CMS.