Text formats duplicated after migration

Created on 29 October 2018, about 6 years ago
Updated 22 July 2024, 5 months ago

After migration my text formats are all duplicated and have IDs assigned. D8 ones still exists.

So now I have two

  • "PHP code"
  • "Full HTML"
  • "Plain text"

and when I try to fix the "The filter_null filter is missing, and will be removed once this format is saved." warnings I get told that the text format already exists and need to be unique. Renaming them to OLD to delete them later yielded another issue. The OLD Plain Text is This format is shown when no other formats are available so may cannot deleted.

Aside there is no way to mass update from old text format to new formats as I know, too. If you know how speak up, please.

Guys - this are exactly the reasons why nobody migrates from D7 to D8! v8.6.2 and migration is still crap. Maybe easier to migrate to wordpress?

πŸ› Bug report
Status

Closed: won't fix

Version

8.7 ⚰️

Component
MigrationΒ  β†’

Last updated 3 days ago

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡³πŸ‡±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 πŸ™‚

Production build 0.71.5 2024