October 2016 - USG Rock Eagle - Everything You Need to Know to Plan Your Drupal 8 Site Migration

Preview:

Citation preview

Everything You Need to Know to Plan Your Drupal

8 Site Migration

Eric SembratKevin Pittman

Eric Scott SembratWeb Manager @ Georgia Tech Ph.D. Student @ Georgia State President @ Atlanta Drupal Users Group Founder @ USGweb

twitter: @esembratweb: webbeh.com

Kevin PittmanSenior Web Developer @ Georgia Tech

email: webdev@iac.gatech.edu web: webdev.iac.gatech.edu

And Now, For Our Goals Today

A Few AssumptionsThis presentation assumes that you are familiar with a few things:

• Drupal 7 architecture, common plugins, and best-practices.

• Common content management system hierarchy and design.

We will do our best to translate any tricky Drupalese down to something more universal.

Our GoalsOur primary goals for today are:

• Providing an introduction into Drupal 8’s major changes.

• Providing information on how Drupal 7 content can be migrated to Drupal 8.

Key Major Changes in Drupal 8

It’s Drupal 8!First big release in Drupal since 2011.

Drupal 8 Core ReleasesSemantic Versioning

8.2.1Major

ReleaseMinor

ReleasePatch

Release

Drupal 8 Core ReleasesSemantic Versioning

8.2.1Major

ReleaseMinor

ReleasePatch

Release

Major Releases involve major structural and API changes.

You don’t see these often.

Drupal 8 Core ReleasesSemantic Versioning

8.2.1Major

ReleaseMinor

ReleasePatch

Release

Minor Releases bring out new features and functionality.

Releases twice a year.

Drupal 8 Core ReleasesSemantic Versioning

8.2.1Major

ReleaseMinor

ReleasePatch

Release

Patch Releases fix bugs, issues, and edge-cases.

Releases every month.

Current VersionThe path to 8.2.x includes new features like:

• Big Pipe caching • Drupal migration • Inline form errors • Enhanced Block Placement Interface • Third Party Library Updates (jQuery, etc)

BigPipeBigPipe adds component-level caching to Drupal.

Howdoesthiswork?

Duringrendering,thepersonalizedpartsareturnedintoplaceholders.

Bydefault,Drupal8usestraditionalcachingforreplacingtheplaceholders.i.e.wedon'tsendaresponseuntilwe'vereplacedallplaceholders.

TheBigPipemoduleintroducesanewstrategy,thatallowsustoflushtheinitialpagefirst,andthenstreamthereplacementsfortheplaceholders.

Thisresultsinhugelyimprovedfront-end/perceivedperformance(watchthe40-secondscreencastabove).

Third Party SupportDrupal 8 wholly supports third party libraries, with the intent to make Drupal more flexible to web trends and changes.

Making up Drupal 7’s ‘jQuery Update’ snafu.

• Symfony (module development) • Twig (theme development) • jQuery

SymfonySymfony is a PHP framework of reusable components to which Drupal 8 is built off of.

An ideal platform for creating products (not websites).

Headless Drupal applications can now be a reality with Symfony.

TwigA template engine for PHP leveraged by the Symfony framework.

Intended to mesh seamlessly with Drupal 8’s Symfony backend.

Proposed to be cleaner code and structure than PHPTemplate.

Module ChangesOverall, modules look and act the same as they did in Drupal 7.

The only major change is in Uninstallation.

Module Changes

The Content Editing Experience

Content Editing

Content Editing

Content Editing

Content Editing

Enter: WYSIWYG CKEditor

Drupal has a WYSIWYGDrupal 8 finally comes pre-installed with a WYSIWYG text-editor.

CKeditor is the chosen default editor.

Still DrupalIf you’re expecting Drupal to act more like WordPress out of the box, Drupal 8 isn’t there yet.

However, Drupal is making strides in making the editor experience less-tedious out-of-the-box.

Module Migration Strategy

Introduction to the ToolDrupal 8 no longer supports in-place major upgrades. Instead, a Migrate tool is provided to import content and settings from a Drupal 6 or 7 website.

Migrate is still experimental as of Drupal 8.2 - it's usable, but may not copy everything you want or exaclty the way you'd like things copied

Tool: PreparationClone your D7 database to your D8 server. Optionally clone the filesystem as well.

Install a fresh copy of Drupal 8, but do not configure anything yet!

Install and enable all modules used on the D7 site that have D8 equivalents. Do not configure any of these modules!

Enable all three Migrate modules (found under CORE - EXPERIMENTAL): Migrate, Migrate - Drupal, Migrate - Drupal UI

Tool: OperationInobvious Steps:

Make sure you are logged in as user #1 (other accounts, even w/admin, do not work)

Navigate to /upgrade on your Drupal 8 site

Tool: OperationEnter mySQL DB username and password that can access your D7 database

Enter local or remote path to your D7 filesystem

Review upgrade paths available - these can't be changed here; determined by modules enabled

If all looks good, start the migration process, then go get a cup of coffee (or two or three ...)

Tool: LimitationsSome specific migration paths that aren't available yet:

Views (Hopefully coming in 8.3.x)

Books (Status unknown)

You can bring in your book nodes, but none of the hierarchy configuration

Blogs (Module is now contrib; status unknown)

PHP Code text filter (Why are you still using this??? ;-)

API: ChangesMuch harder for module maintainer to port modules to D8.

Even today, some popular modules still haven't been ported.

Webform - Alternates Available:

Contact Storage: https://www.drupal.org/project/ contact_storage (Plus Field Group, CSV Serialization, Markup, Field Validation, Contact Storage Export)

YAML Form: https://www.drupal.org/project/yamlform

API: ChangesPorted modules do not always have same features as D7 versions

Be aware that some modules have new names

Administration Menu (admin_menu) -> Admin Toolbar (admin_toolbar)

Many Drupal 7 modules may never be ported

Custom modules must be rewritten to work with Drupal 8

Module Migration PlanningAssess your D7 site's modules - make a spreadsheet and research each one for D8 upgrade paths

No direct path available? Determine if the module can simply be discarded. If not:

• Port it yourself (you'll need some good PHP coding experience)

• Pay someone to port it (you'll need $$$)

• Find an alternative module that does roughly the same thing (you may lose data or have to manually migrate your data).

No easy solution, but for the future, avoid using modules that don't have a solid history

Porting Your Custom Modules: API ChangesConfig files now written in YAML

Many hook_* API calls are gone

Blocks, filters, etc. are now written into autoloader class files

Plan on it taking a while to port a module to Drupal 8

Porting Your Custom Modules: API Changes (Gotchas)All output must be returned as a render array

Plain HTML can be sent as #markup, but is filtered to protect against XSS vulnerabilities

May need to whitelist additional HTML tags and/or enable additional URL protocols

• See http://webdev.iac.gatech.edu/drupal-8-migration for details

Twig based rendering is recommended, but not required. Has its own quirks.

Porting ThemesThemes use the Module API, so everything said above applies to themes

Templating now done using the Twig language

May be easier to set up a subtheme of a core D8 theme and then add your customizations to that subtheme

Questions?

Recommended