47
Everything You Need to Know to Plan Your Drupal 8 Site Migration Eric Sembrat Kevin Pittman

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

Embed Size (px)

Citation preview

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

Everything You Need to Know to Plan Your Drupal

8 Site Migration

Eric SembratKevin Pittman

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

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

twitter: @esembratweb: webbeh.com

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

Kevin PittmanSenior Web Developer @ Georgia Tech

email: [email protected] web: webdev.iac.gatech.edu

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

And Now, For Our Goals Today

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

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.

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

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.

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

Key Major Changes in Drupal 8

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

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

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

Drupal 8 Core ReleasesSemantic Versioning

8.2.1Major

ReleaseMinor

ReleasePatch

Release

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

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.

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

Drupal 8 Core ReleasesSemantic Versioning

8.2.1Major

ReleaseMinor

ReleasePatch

Release

Minor Releases bring out new features and functionality.

Releases twice a year.

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

Drupal 8 Core ReleasesSemantic Versioning

8.2.1Major

ReleaseMinor

ReleasePatch

Release

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

Releases every month.

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

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)

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

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).

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

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

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

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.

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

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.

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

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

The only major change is in Uninstallation.

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

Module Changes

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

The Content Editing Experience

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

Content Editing

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

Content Editing

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

Content Editing

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

Content Editing

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

Enter: WYSIWYG CKEditor

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

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

CKeditor is the chosen default editor.

Page 27: October 2016 - USG Rock Eagle - Everything You Need to Know to Plan Your Drupal 8 Site Migration
Page 28: October 2016 - USG Rock Eagle - Everything You Need to Know to Plan Your Drupal 8 Site Migration
Page 29: October 2016 - USG Rock Eagle - Everything You Need to Know to Plan Your Drupal 8 Site Migration
Page 30: October 2016 - USG Rock Eagle - Everything You Need to Know to Plan Your Drupal 8 Site Migration
Page 31: October 2016 - USG Rock Eagle - Everything You Need to Know to Plan Your Drupal 8 Site Migration
Page 32: October 2016 - USG Rock Eagle - Everything You Need to Know to Plan Your Drupal 8 Site Migration
Page 33: October 2016 - USG Rock Eagle - Everything You Need to Know to Plan Your Drupal 8 Site Migration
Page 34: October 2016 - USG Rock Eagle - Everything You Need to Know to Plan Your Drupal 8 Site Migration

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.

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

Module Migration Strategy

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

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

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

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

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

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

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

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 ...)

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

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??? ;-)

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

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

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

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

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

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

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

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

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

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.

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

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

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

Questions?