Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Migrate Drupal7 to Drpual8
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
kazukomurata
October 01, 2020
Technology
320
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Migrate Drupal7 to Drpual8
kazukomurata
October 01, 2020
Transcript
20 slides
Migrate Drupal7 to Drupal8 @kazunoko_m
Drupal8で移行といえば・・・ Drupal8サイト Drupal9サイト Drupal7サイト 他のCMS etc... HTML群
今日の観点 Drupal8サイト Drupal9サイト Drupal7サイト HTML群 他のCMS etc...
何が移行できる • サイトの設定からコンテンツのデータまで全て • と、言うもののコントリビューションモジュールは D8版が存在していないと厳し い
手順 1. 新規インストールが完了したDrupal8を用意 2. D7で有効だったモジュールをD8側でもインストール・有効化 3. 移行のモジュールを有効化 4. 移行実行 a.
画面から b. drushから 5. カスタムテーマ・モジュールのD8版作成
移行のモジュール
画面から実行 1/6 URL : /upgrade
画面から実行 2/6
画面から実行 3/6
画面から実行 4/6
画面から実行 5/6
画面から実行 6/6
drushから実行 1/2 • 参考 : Upgrade using Drush • コントリビューション
Migrate Plus, Migrate Tools が必要 1. 移行用のconfigを生成 a. https://qiita.com/masam10/items/5b0d14d2af0115307d27 の設定を自動生成している 2. 設定系の移行実行 3. コンテンツ系の移行を実行 4. 実行結果を確認
drushから実行 2/2 移行用のconfigを生成 drush migrate -upgrade --legacy-db-url=mysql://user:password@server/db --legacy-root=http://example.com --configure-only 設定系の移行実行
drush migrate:import --group=migrate_drupal_7 --tag=Configuration --execute-dependencies コンテンツ系の移行を実行 drush migrate:import --group=migrate_drupal_7 --tag=Content --execute-dependencies 実行結果を確認 drush migrate:status --group='migrate_drupal_7'
Tips という名のつまずいたところ • Field collection移行 • 多言語コンテンツ:デフォルト言語が変わってしまう • テキストのフォーマット混合問題 •
D8にテキストフィルター、フォーマッター、ウィジェットが無い • メディア
Field collection移行 • Drupal8にField collectionはない • Paragraphsに移行する • 対応パッチ: https://www.drupal.org/project/paragraphs/issues/2911244
• 8.x-1.x-dev をインストールでOK。 https://git.drupalcode.org/project/paragraphs/-/network/8.x-1.x
多言語コンテンツ デフォルト言語が変わる • 翻訳言語が存在する場合、言語コードの abc順に登録される。データ構造 上、最初に登録される言語がオリジナルになる。 • オリジナル:日本語(ja)・翻訳:英語(en)の場合、英語(en)が先に登録されるの で、オリジナル・翻訳が逆転する。 •
パッチにて、オリジナル言語を先に登録するようにソート順を追加する。 • https://gist.github.com/kazukomurata/f4e59bdbc7ad645e1d52203d7 6380017 ◦ おそらくPostgreSQLではソート順を逆にする必要がある。
テキストフォーマット混合問題 • https://www.drupal.org/docs/upgrading-drupal/known-issues-when-u pgrading-from-drupal-6-or-7-to-drupal-8-or-9 • テキスト、テキストエリアのフィールドを複数のコンテンツタイプで共有してい る場合に発生する可能性がある • D7とD8の構造の違い
D8にテキストフィルター、フォーマッター、ウィ ジェットが無い • テキストフィルター ◦ 独自作成か・・・解がない。 • フォーマッター ◦ Twigの方が早い
• ウィジェット ◦ 代替モジュールは結構ある
メディア • D7にもメディアがあったが、D8と構造が異なる。 • ファイル群をメディアへ移行するモジュールがある。 • https://www.drupal.org/project/media_migration • ただし、単純なファイル添付フィールドもメディア参照に切り替わってしまいそ う(ソースコードの雰囲気)
• それは・・・やりすぎかも・・・。
More Decks by kazukomurata
See All by kazukomurata
Drupal SDC入門
kazukomurata
0
170
長期運用のためのDrupal開発入門
kazukomurata
0
97
Drupal8 Migrate API
kazukomurata
0
380
Drupal8 Problem of multilingualization of contents
kazukomurata
0
170
Drupalのデモサイト作って明日までに!と言われたら
kazukomurata
0
910
Drupal8 CKEditor TIps
kazukomurata
0
460
Drupal7 & 8 翻訳コンテンツの罠
kazukomurata
0
290
Drupal7×Cloudfront×SSL
kazukomurata
0
290
Drupal8 State API と Configuration API
kazukomurata
0
310
Other Decks in Technology
See All in Technology
ノードが消える前提で設計する!Karpenterで金融システムを止めないためのノウハウ大全
daitak
1
250
攻撃と守りは何が変わり、何が変わらないのか~最近の不正アクセスから考える、リスク評価と標準の使いどころ
oidfj
2
320
市販IoT機器や自作IoT機器とHomeAssistantを駆使して家の電気代をできる限り見える化する方法の考案
harutiro
0
420
AI-Ready なデータ基盤ってなに? & 新卒未経験が、いま考えていること
imuta
0
1.1k
Web Performance Is a Journey [PerfNow 2026]
tammyeverts
2
150
20261119_AgentCore
takuyay0ne
2
280
IP重複は"ランディングVPC"で受け止める ― PrivateLink と Transit Gatewayによるマルチテナント接続基盤の設計
hatahata021
3
270
「個社」ではなく「業界」の課題を解く AI 対話開発 ー 価値を広げる設計と、価値を守るエンジニアリング ー
ivry_presentationmaterials
4
870
おうち環境でも「なるべく止めたくない!」 ― おうち環境の機器冗長化の理想と現実
yuutosi
1
700
SBOM 生成ツールで 2026 Minimum Elements はどこまで満たせるのか
gokken
0
160
メール到達性を支える、リンク先URLのドメイン評価の扱い方
wind111
0
200
プラガブルで宣言的なソフトウェアファクトリーを支えるTypeScript
timakin
2
600
Featured
See All Featured
Fantastic passwords and where to find them - at NoRuKo
philnash
53
4k
Building a A Zero-Code AI SEO Workflow
portentint
PRO
0
850
Become a Pro
speakerdeck
PRO
31
6.4k
Information Architects: The Missing Link in Design Systems
soysaucechin
1
1.3k
What the history of the web can teach us about the future of AI
inesmontani
PRO
3
830
The Language of Interfaces
destraynor
162
27k
Exploring anti-patterns in Rails
aemeredith
4
580
30 Presentation Tips
portentint
PRO
1
480
The #1 spot is gone: here's how to win anyway
tamaranovitovic
4
1.2k
Google's AI Overviews - The New Search
badams
0
1.7k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
50
10k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k