Problem/Motivation
Identified while working on Bean Migrate:
The block config migration destination plugin EntityBlock forces every block config migrations to calculate the plugin and theme destination properties, because the destination ID is returned by a Storage::loadByProperties() call.
This is a big overhead for translation migrations, because:
- The
pluginand thethemeneed to be re-calculated due to the destination plugin's logic. - The static map of the plugin property should be kept in sync, but for no reason, because:
- Right now, the block plugin ID uses a lookup – but this isn't used at all, due to the destination plugin.
Proposed resolution
For block config translation migrations (at least) it should be possible to specify only the destination block content ID and the actual property translation.
Remaining tasks
User interface changes
API changes
Data model changes
Release notes snippet
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | core-migration_destination_block_config_id_dx-3200936-3.patch | 2.59 KB | huzooka |
Comments
Comment #2
huzookaComment #3
huzookaComment #4
wim leersEvidently tests are passing. I don't know how thorough tests are for block migrations though.
I think it'd be helpful if you could explain this:
This is touching the
langcodeandidproperties…… but this is touching the
pluginandthemeproperties.Comment #5
huzookaRe #4:
I think it is unnecessary. The lines following that condition (in EntityBlock) explain what's going on.
Comment #6
wim leers#5:
Aha. Those lines are:
And so you're saying they're no longer being used now. I see.
So …
d7_block_translationdoes not need to migrate those values at all?Comment #7
quietone commentedInteresting find.
Changing the destination plugin will affect all block migrations and I would like to see more documentation here about these changes.
I don't understand 'placement translation'. The translations are for properties like 'title' not about placement. Am I missing something?
Some questions, are we always guaranteed that if there is a langcode and id that the id is correct? Will migrations such as d7_block still work if a language property was added to the process pipeline?
Comment #13
quietone commented