Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
#2611100: D7 -> D8 migration made it possible to automatically migrate text formats using the filter_markdown
filter in Drupal 7 to the markdown
filter in Drupal 8.
Great! 🥳
As of #2936365: Migrate UI - allow modules to declare the state of their migrations, modules can declare their upgrade status. See https://www.drupal.org/node/2929443 for details. Let's do that, so that the Markdown module shows up in Migrate Drupal UI
for an easy migration!
Comment | File | Size | Author |
---|---|---|---|
#2 | 3095358-2.patch | 980 bytes | Wim Leers |
Comments
Comment #2
Wim LeersComment #3
geerlingguy CreditAttribution: geerlingguy at Midwestern Mac, LLC commentedNote: I'm trying to upgrade my D7 site to D8, and it seems like the filter mapping (
filter_markdown
tomarkdown
) is not working :/I'm using 8.x-1.3, as it seems it's a newer release than the latest 8.x-2.x alpha... but even there, the
markdown_migration_plugins_alter()
hook is identical, so I'm not sure why the mapping is not taking affect.When I run the migration, I get:
And in the migration logs:
I confirmed the Drupal
FilterID::transform()
call is not getting a transformed plugin ID, it's stillfilter_markdown
.Comment #4
Wim LeersDid you install the
markdown
module on the Drupal 8 destination site?Comment #5
geerlingguy CreditAttribution: geerlingguy at Midwestern Mac, LLC commented@Wim - Yes, but I think it could be that after doing so, I have to delete all my migrations and re-run `drush migrate-upgrade` to generate new migrations with the new mapping. We'll see if that works...
Comment #6
geerlingguy CreditAttribution: geerlingguy at Midwestern Mac, LLC commented@Wim - After another hour's debugging, I found what @mdlutz24 said in this comment to be true: the migrate module's hook invocation only works for migrations that are directly running a
d7_filter_format
migration.If you upgrade your site from Drupal 6 or 7 using Migrate Upgrade /
drush migrate-upgrade
, the filter mapping from the Markdown module doesn't apply.I had to add a custom module with its own hook implementation to be able to have the mapping apply to my auto-generated
upgrade_d7_filter_format
:Tracking this in my own codebase here: https://github.com/geerlingguy/jeffgeerling-com/issues/7
So it seems that for anyone upgrading from Drupal 6 or Drupal 7 using Migrate Upgrade, this module does not work out of the box. I had to spend some time debugging the migrations to find the right array key (
migration_config_deriver:upgrade_d7_filter_format
) to override in my own custom module.Comment #7
Wim LeersWOAH! If that's the case, then that is IMHO a supercritical bug in
migrate_upgrade
; it's breaking a lot of customizations out there! Including some in core I think. 🤯Comment #8
geerlingguy CreditAttribution: geerlingguy at Midwestern Mac, LLC commented@Wim - entire codebase is here: https://github.com/geerlingguy/jeffgeerling-com
If you want I may be able to provide a sanitized D7 codebase to reproduce the issue. I've done a very vanilla upgrade, just using
drush migrate-upgrade
the whole way.Comment #9
markhalliwellI'm confused. Are y'all saying this is actually an issue with https://www.drupal.org/project/migrate_upgrade and not this project?
Comment #10
Wim LeersThat is what I'm saying in #7.
#2 is about Drupal core's
migrate_drupal
module, which is the core UI to help with migrating from Drupal 7 to 8. The YAML file that the patch in #2 is adding is to ensure that UI shows that an upgrade path is available.Comment #11
markhalliwellAh ok. Just wanted to make sure #2 was still needed is all.