TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
October 2016 - USG Rock Eagle - Everything You Need to Know to Plan Your Drupal 8 Site Migration
1. Everything You Need to
Know to Plan Your Drupal
8 Site Migration
Eric Sembrat
Kevin Pittman
2. Eric Scott Sembrat
Web Manager @ Georgia Tech
Ph.D. Student @ Georgia State
President @ Atlanta Drupal Users Group
Founder @ USGweb
twitter: @esembrat
web: webbeh.com
3. Kevin Pittman
Senior Web Developer @ Georgia Tech
email: webdev@iac.gatech.edu
web: webdev.iac.gatech.edu
5. A Few Assumptions
This 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.
6. Our Goals
Our 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.
10. Drupal 8 Core Releases
Semantic Versioning
8.2.1Major
Release
Minor
Release
Patch
Release
Major Releases involve major structural
and API changes.
You don’t see these often.
11. Drupal 8 Core Releases
Semantic Versioning
8.2.1Major
Release
Minor
Release
Patch
Release
Minor Releases bring out new
features and functionality.
Releases twice a year.
12. Drupal 8 Core Releases
Semantic Versioning
8.2.1Major
Release
Minor
Release
Patch
Release
Patch Releases fix bugs, issues, and
edge-cases.
Releases every month.
13. Current Version
The 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)
14. BigPipe
BigPipe adds component-level caching to Drupal.
How does this work?
During rendering, the personalized parts are turned into placeholders.
By default, Drupal 8 uses traditional caching for replacing the placeholders.
i.e. we don't send a response until we've replaced all placeholders.
The BigPipe module introduces a new strategy, that allows us to flush the
initial page first, and then stream the replacements for the placeholders.
This results in hugely improved front-end/perceived performance (watch
the 40-second screencast above).
15. Third Party Support
Drupal 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
16. Symfony
Symfony 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.
17. Twig
A 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.
26. Drupal has a WYSIWYG
Drupal 8 finally comes pre-installed with a
WYSIWYG text-editor.
CKeditor is the chosen default editor.
27.
28.
29.
30.
31.
32.
33.
34. Still Drupal
If 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.
36. Introduction to the Tool
Drupal 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
37. Tool: Preparation
Clone 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
38. Tool: Operation
Inobvious 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
39. Tool: Operation
Enter 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 ...)
40. Tool: Limitations
Some 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??? ;-)
41. API: Changes
Much 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
42. API: Changes
Ported 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
43. Module Migration Planning
Assess 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
44. Porting Your Custom Modules:
API Changes
Config 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
45. 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.
46. Porting Themes
Themes 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