1

I did a migration from Drupal 6 to Drupal 8 and now I have two Full HTML, two Plain text, and all other individual for both versions of Drupal default text formats. Of course when I try to modify the duplicates I have warning that it is not possible to have the same human readable names so I have Full HTML and Full HTML2 now. I want to get rid the one of them. It looks like that all the migrated by me content is with a text format with a machine name 2 while the other Full HTML text format with no any content in the website is with the machine name full_html. Also the default Plain Text, the one that it is not possible to be removed is with a machine name 3.

As far as understand by the research I did, even if I disable the full_html text format, I cannot use its machine name for the other one. I don't mind what the name is, but can I safely change somehow the text format machine name 2 to something more meaningful?

Is it necessary to do so, or it will be fine if I leave it this way and just remove the full_html one as far as I do not need it?

1 Answer 1

1

One option is in the migration template, to add the input format value.

I found the default_value plugin worked well there e.g, to set default full_html:

field_subheading:
  plugin: sub_process
  source: field_subheading
  process:
    value: value
    format:
      plugin: default_value
      default_value: full_html

Another option, could be to run an SQL query to update the field data and revision data tables

update node__field_subheading set field_subheading_format = 'full_html' where field_subheading_format = 'other_format';
update node_revision__field_subheading set field_subheading_format = 'full_html' where field_subheading_format = 'other_format';

then clear cache.

However fixing as part of the migration template mapping is recommended.

2
  • Thanks for you reply, sorry if I am asking something obvious but I cannot run the migration again because the website has a lot of new content, does this mean that I can forget for the migration template and use the sql queries above to update the machine names?
    – Bo rislav
    Jun 14, 2020 at 14:54
  • it works with the sql query, thank you!
    – Bo rislav
    Jun 14, 2020 at 15:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.