- π³π±Netherlands EgbertB
I dont think its a rude remark.
I migrated a set of sites from d7 to d8 and d9, and this issue is very confusing when you do not undertand how to map the old text formats to the new ones, or that you even needed to do so before you started....
The issue is not mentioned in the standard migration directives on the drupal sites.If, like me, you v struggled to migrate a d7 site with thousands of nodes, first with drsuh, and than via the ui, and then with drush again, finding out that a former developer left a lot of D6 rubble in the database, or nodes without a contenttype, cause someone deleted that in like 1865, and then you finally see youv have succesfully migrated all content to D9, poured it into a docker or lando setup, connected a solr server, but than nothing shows, and you have this confusing text-format mess, and no indication of how to solve it, it is really irritating.
Do you have to study custom migrations, do you have to start over again?I mean, a D7 D9 migration already take a huge amount of time for your clients, just rebuilding the theme for instance....
Solution
Me, in the above mentioned case, without a mapping, I just simply queried the new D9 database. First looked in the database export what tables had a _format (varchar 255) field.
Then generated a large SQL-query like...
(I added the php filter module because that one was extensively used in the D7 version)update node__body set body_format = 'basic_html' where body_format = '1';update node_revision__body set body_format = 'basic_html' where body_format = '1';update node__body set body_format = 'full_html' where body_format = '2';update node_revision__body set body_format = 'full_html' where body_format = '2';update node__body set body_format = 'php_code' where body_format = '3';update node_revision__body set body_format = 'php_code' where body_format = '3';update node__body set body_format = 'plain_text' where body_format = '5';update node_revision__body set body_format = 'plain_text' where body_format = '5';
- ππΊHungary giorgio79
Thx Egbert. You perfectly described my situation π