drupal 8 - faichi 8 migration - the... · or drupal 7 source data to drupal 8, and the migrate...

12
DRUPAL 8 MIGRATION GUIDE the secret sauce FAICHI SOLUTIONS

Upload: vuongthuan

Post on 25-May-2018

233 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: DRUPAL 8 - Faichi 8 Migration - the... · or Drupal 7 source data to Drupal 8, and the Migrate Drupal UI module provides a user interface for a guided migration from Drupal 6 or 7

DRUPAL 8 MIGRATION

GUIDE

the secret sauce

F A I C H I S O L U T I O N S  

Page 2: DRUPAL 8 - Faichi 8 Migration - the... · or Drupal 7 source data to Drupal 8, and the Migrate Drupal UI module provides a user interface for a guided migration from Drupal 6 or 7

Content

Chapter 1

Chapter 2

Chapter 3

Chapter 4

Introduction

Things to lookout before migrating to Drupal 8

Challenges faced by Drupal 7 developers

Phase wise Drupal 8 migration

D r u p a l 8 M i g r a t i o n - t h e s e c r e t s a u c e 0 2

Page 3: DRUPAL 8 - Faichi 8 Migration - the... · or Drupal 7 source data to Drupal 8, and the Migrate Drupal UI module provides a user interface for a guided migration from Drupal 6 or 7

D r u p a l 8 M i g r a t i o n - t h e s e c r e t s a u c e 0 3

DRUPALDrupal is among the most popular CMS’ and has been offering the community with several version updates. With Drupal 6 no longer being supported, by the Drupal Community, a huge amount of sites need to be migrated to Drupal 7 or 8, and quickly! Given the significant changes in Drupal 8 structure, migrating from Drupal 6 or Drupal 7 to Drupal 8 is particularly challenging. But with all the hustle in the market, organizations often miss out on the basic aspects before updating their sites.

THINGS TO LOOK OUT BEFORE MIGRATING TO DRUPAL8

Companies constantly strive to be distinct with amazing designs and an exceptional user experience; however, they often miss out on the crucial piece, i.e. are they ready for the upgrade. There are a couple of scenarios when one could decide to upgrade:

However, before one decides to start an upgrade, it is important to consider module availability, time constraints, budget for upgrading, features of your site, content structure, and similar more. Even though all site upgrades are unique, there are a few questions you must ask before upgrading the site to Drupal 8:

Is your site on Drupal 6? Currently used contributed modules, are they migrated for Drupal 8?Do you need more out of core?

Building a new website Current website is in Drupal 6 and is facing many issues Current website in Drupal 7 and want to upgrade to Drupal8 to implement new and enhanced features.

Chapter 1

Page 4: DRUPAL 8 - Faichi 8 Migration - the... · or Drupal 7 source data to Drupal 8, and the Migrate Drupal UI module provides a user interface for a guided migration from Drupal 6 or 7

D r u p a l 8 M i g r a t i o n - t h e s e c r e t s a u c e 0 4

HAVE A DRUPAL 6 WEBSITE?If the answer is yes, you don’t have the luxury of waiting for contributed modules to be ready for use. The only way out is to migrate your site to either Drupal7 or Drupal8 to protect the integrity of your site ( it would be vulnerable to any new security issues). Approximately, about one in ten Drupal sites are still running on Drupal 6, and it is an easy target for a site breach.

Thus moving your site from Drupal 6 to a secure version of Drupal is very critical. While this eBook provides details on the ways to check if your website is ready for migration, the process itself is complex. Along with migrating/upgrading modules, you need to migrate, content, data and any other custom development.

migrate is now a part of the core

This module allows you to define and build custom migration plugins. It facilitates the migrating Drupal 6 or Drupal 7 source data to Drupal 8, and the Migrate Drupal UI module provides a user interface for a guided migration from Drupal 6 or 7 to Drupal 8. Assisted upgrades to Drupal 8 cannow be done, much more easily than they used to be able to earlier.

Three modules were added in order to

facilitate the custom migrations as well as the Drupal 6 or Drupal 7 to

Drupal 8 migrations:

• Migrate • Migrate Drupal

• Migrate Drupal UI

Chapter 2

Page 5: DRUPAL 8 - Faichi 8 Migration - the... · or Drupal 7 source data to Drupal 8, and the Migrate Drupal UI module provides a user interface for a guided migration from Drupal 6 or 7

D r u p a l 8 M i g r a t i o n - t h e s e c r e t s a u c e 0 5

CONTRIBUTED MODULES USED ON MY SITE READY IN DRUPAL 8?Most widely used modules, like Views and EntityReference have been brought into core. Having said that, there are still a large number of modules that you are probably using that are not a part of the core. There could be a possibility,that some modules could be ready while the others may not be.

Also, check if support for your contrib modules is available in Drupal 8. If you are not sure about the status of a module, you will need to investigate the state of the module for your specific use case. That can be checked by searching specific modules on Drupal.org. Here’s an example of the status of the Metatag module in Drupal 8

‘Each module is a case on its own, with different functionalities, so there isn’t a perfect, general answer to that question. As a rule of thumb we could take the first recommendation 8.x release of a module, regardless if it’s a release candidate (RC), alpha or beta, to be the point when we regard it to be stable enough to start consider using it ‘

-István Zoltán Szabó

Page 6: DRUPAL 8 - Faichi 8 Migration - the... · or Drupal 7 source data to Drupal 8, and the Migrate Drupal UI module provides a user interface for a guided migration from Drupal 6 or 7

D r u p a l 8 M i g r a t i o n - t h e s e c r e t s a u c e 0 6

Three modules were added in order to facilitate the custom migrations as well as the Drupal 6 or Drupal 7

to Drupal 8 migrations:

• Migrate • Migrate Drupal

• Migrate Drupal UI

1

Let's look at an example of metatag module in Drupal 8

Page 7: DRUPAL 8 - Faichi 8 Migration - the... · or Drupal 7 source data to Drupal 8, and the Migrate Drupal UI module provides a user interface for a guided migration from Drupal 6 or 7

D r u p a l 8 M i g r a t i o n - t h e s e c r e t s a u c e 0 7

NEED MORE OUT OF CORE?Drupal 8’s core modules are exceptionally robust than in any previous versions. If you’re looking to enhance your Drupal 7 sites functionality, it makes more sense to upgrade to Drupal 8 as compared to spending time and resources developing custom code for modules that are now available in core. Some of the functionalities now found in core include:

HTML5 Proficiency Powerful Authoring Tools like WYSIWYG Editor and CKEditor Views Support for Accessibility Techniques like WAI-ARIA, Aria Live Announcements, API and TabManager

Page 8: DRUPAL 8 - Faichi 8 Migration - the... · or Drupal 7 source data to Drupal 8, and the Migrate Drupal UI module provides a user interface for a guided migration from Drupal 6 or 7

CHALLENGES FACED BY DRUPAL 7 DEVELOPERSbelow are a few of the challenges that Drupal developers face while working on Drupal 8 projects

D r u p a l 8 M i g r a t i o n - t h e s e c r e t s a u c e 0 8

The Drupal core is yet not stable and a lot of issues need to be fixed. Moreover, the Drupal 8 structure is considerably different and also lacks documentation. Majority of Drupal 7 modules are still not available in Drupal 8, since they are in the porting phase

HOW MUCH DO DRUPAL 7 DEVELOPERS HAVE TO LEARN?

The tutorials available online for Drupal 8 are version based and quickly become outdated as new versions are released. Developers working on recent versions don't have access to tutorials that cater to their needsOn the theming front, they face difficulties with the twig templating, understanding of variables with conditions and preprocess functions.

The theme layer is one of the major changes from Drupal 7 to Drupal 8. In addition to this:

Thus we can say that Drupal 7 developers have a lot to learn. With the Drupal community providing support material on Drupal.org site, Drupal 8 will grow and more developers would acquire the skills to work on a project. Meanwhile it is wise to leverage companies with Acquia certified Drupal 8 developers.

Chapter 3

The twig templating system Introduction of Symfony framework into the core Plugin system Transition from Drupal 7’s procedural style to an object- oriented style of programming.

Page 9: DRUPAL 8 - Faichi 8 Migration - the... · or Drupal 7 source data to Drupal 8, and the Migrate Drupal UI module provides a user interface for a guided migration from Drupal 6 or 7

PHASE WISE MIGRATION TO DRUPAL 8

D r u p a l 8 M i g r a t i o n - t h e s e c r e t s a u c e 0 9

Information Architecture

Your content can be migrated seamlessly to Drupal 8. This requiresa lot of nodes, users, terms and other components of your old site to be moved to Drupal 8 with minimal changes. Content migration is to be carefully planned beforehand. You and your developers must decide what content must be kept, and what to discard. Everything that you're retaining, you'll have to plan where it belongs on the new site.

The Migrate module allows developers to build custom migrations that are suitable for your site. Each migration matches all fields of the source site with the fields of the new site. If the migration process is setup properly, it is possible to run a migration multiple times as the old site changes and the new site is being developed.

Upgrading your site presents you with the opportunity to reconstruct your Information Architecture. There could be unused fields or data that has to be duplicated in multiple places.

While migrating to Drupal 8, your existing Information Architecture isn't copied to the new site—it is rebuilt. This gives you an opportunity to change, fix old problems, and add improvements.

Content

Even though you might have it all figured out, the reason to upgrade to Drupal8. The process is rather filled with hurdles and challenges, thus making it a complete nightmare for developers and enterprises alike.

Chapter 4

Page 10: DRUPAL 8 - Faichi 8 Migration - the... · or Drupal 7 source data to Drupal 8, and the Migrate Drupal UI module provides a user interface for a guided migration from Drupal 6 or 7

D r u p a l 8 M i g r a t i o n - t h e s e c r e t s a u c e 1 0

Theme

The template engine for Drupal 8 is totally different from that of Drupal 6 or Drupal 7. Twig in Drupal 8 grants a lot of advantages, however, it has a completely different syntax altogether. Multiple elements need to change, so be prepared to put in a lot of work for a new theme! Given the time when Drupal 6 sites were being built, majority Drupal 6 sites are not mobile ready.

Responsive design being a core part of any site, you will need an updated design too. Theme migration considerations:

Contrib Modules

The older Drupal sites frequently use a lot of contributed (a.k.a contrib) modules. With Drupal8 there is a high chance that these modules may not be stable or available. The utmost important modules are stable in Drupal 8, however, you should be careful while dealing with contrib modules. All modules are not identical, neither are all of them well- maintained.

It is the Drupal Developers job to determine when is it necessary to use a contrib module, and when it should be avoided. Custom, tailor- made solution can often be the best choice.

Some hooks can be re-used but not all of them. Custom template coding need to be re-written.Most CSS properties can be re- used, however, selectors will need to adapt to the new theme structure.You'll need to choose an appropriate base Drupal theme.

Page 11: DRUPAL 8 - Faichi 8 Migration - the... · or Drupal 7 source data to Drupal 8, and the Migrate Drupal UI module provides a user interface for a guided migration from Drupal 6 or 7

D r u p a l 8 M i g r a t i o n - t h e s e c r e t s a u c e 1 1

Now comes the tricky part of migration projects. Custom Drupal 6 modules has absolutely no Drupal 8 versions, thus each custom module needs to be judiciously evaluated.

1. The first step is to understand what is the function of that particular module is. In case the specification is missing, the only way around is to read and understand the module’s code. 2. Once you get a thorough understanding, the next step is to determine if that module is worth keeping. There are chances that better alternatives might have been introduced or maybe that functionality was not needed at all. 3. If you decide to retain the module, the code for it needs to be refactored according to the changed Drupal techniques: Database API, Config API, entities, etc. 4. Fortunately the use of external services through APIs and the basic PHP operations can stay the same.

Best practices for contrib module upgrades, have already been established by the Drupal community.

Custom modules

Page 12: DRUPAL 8 - Faichi 8 Migration - the... · or Drupal 7 source data to Drupal 8, and the Migrate Drupal UI module provides a user interface for a guided migration from Drupal 6 or 7

SUMMARY

D r u p a l 8 M i g r a t i o n - t h e s e c r e t s a u c e 1 2

Now that we are aware of the obstacles and the aspects one should keep in mind before migrating to Drupal 8, let us take a look at the driving factors why you should switch to an up-to-date platform:

Drupal 8 speaks your language - multi-lingualIt is mobile first and not just mobile friendlyHas a powerful WYSISYG editor Better and dependable scalability Built-in configuration management New features and functionalities Easy to use!

If you'd like to get more details or talk about your Drupal needs, feel free to reach us or visit our Drupal services page.

Get a free website valuation