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.
Problem/Motivation
Followup to #1709960: declare a maximum length for entity and bundle machine names.
In Drupal 8, entity and bundle machine names are limited to 32 characters
Propos ed resolution
We have two options
- Automatically cut entity and bundle machine names at 32 characters.
- Allow users to rename entities and bundle machine names that exceed the 32 character limit during the migration process.
Assigning to moshe initially just to make sure he has this issue in his queue.
User interface changes
Maybe some new UI in the migrate_drupal module
API changes
None.
Comments
Comment #1
moshe weitzman CreditAttribution: moshe weitzman commentedThe migration team will sort this. I vote for automatic truncate, with uniqueness preserved. So if we run into articles and articles_red and we have to truncate we do articl and articl1. We run into this in Migrate a lot.
Comment #2
jessebeach CreditAttribution: jessebeach commentedComment #3
BerdirNote that this is *not* trivial, this isn't the usual one-off specific truncation.
Changing a bundle during migration will affect a whole bunch of other migrations as well, you need to consider this for fields, displays, language configuration, menu settings of a node type, basically everything that is based on the bundle.
And the entity_type ID (not sure if you mean entity type or entity ID) can't be truncated automatically, because this then depends on what the module providing that entity type did in its 8.x version.
Comment #4
bdone CreditAttribution: bdone commentedwhile not knowing about this issue (until today), i've attempted a patch in #2247903: Add a substr options to DedupeBase process plugin, to try and add a substring option to the MachineName process plugin. maybe that is one possible solution?
Comment #5
bdone CreditAttribution: bdone commentedit's not automatic, but there is some more possible progress happening towards this in #2247903: Add a substr options to DedupeBase process plugin.
Comment #6
bdone CreditAttribution: bdone commented#2247903: Add a substr options to DedupeBase process plugin has been committed. i'm not 100% sure, but i think this is a now a duplicate. please re-open if that's not correct, or more is needed here.
Comment #7
BerdirAre we actually using it for the relevant migrations or did issue just add the plugin?
Comment #8
bdone CreditAttribution: bdone commented@Berdir, that issue only affected existing d6->d8 migrations that were already using the dedupe process plugin. this list was:
are more needed?
Comment #9
BerdirGood question not sure.
It's not a problem for D6 but for D7 migrations, with fields on terms that have the vocabulary as bundle will need to be dealt with accordingly, so we need to make sure that the bundle in the instance configuration is cut in the same way as the one in the vocabulary migration.