Rollback of configuration translations clears the map table but does not delete the translation. And the reported rollback count is incorrect.
v@dev2 {/opt/sites/d8} (tmp2)$ drush mi upgrade_system_site
Processed 1 item (1 created, 0 updated, 0 failed, 0 ignored) - done with 'upgrade_system_site' [status]
v@dev2 {/opt/sites/d8} (tmp2)$ drush mi upgrade_d6_i18n_system_site
Processed 2 items (2 created, 0 updated, 0 failed, 0 ignored) - done with 'upgrade_d6_i18n_system_site' [status]
v@dev2 {/opt/sites/d8} (tmp2)$ drush mr upgrade_d6_i18n_system_site
Rolled back 1 item - done with 'upgrade_d6_i18n_system_site' [status]
First noticed problems with the rollback of translations in #2225717: Add config translation support to migrations and implement for Drupal 6 user profile fields, where the problem exists with fields.
Comment | File | Size | Author |
---|---|---|---|
#8 | interdiff.txt | 498 bytes | quietone |
#8 | 2825603-8.patch | 12.55 KB | quietone |
#8 | 2825603-8-fail.patch | 9.52 KB | quietone |
#4 | interdiff.txt | 1.64 KB | quietone |
#4 | 2825603-4.patch | 12.56 KB | quietone |
Comments
Comment #2
quietone CreditAttribution: quietone as a volunteer commentedIn order to rollback the translations, the langcode needs to be in the ids. And to do that I took a page from the D6 node translation migration and added a 'translations' key to the destination and a method isTranslationDestination(). This changes the test for a translation from checking $row for a language key to checking that key. Are there or will there be problems with this new approach?
Comment #4
quietone CreditAttribution: quietone as a volunteer commentedForgot to update ConfigTest for the changes to Config.
Comment #5
mikeryanComment #6
mikeryanNit: we could save a *whole line* with
$ids = [$this->config->getName()];
Apart from that, how about running a test-only patch through the testbot?
Thanks.
Comment #7
mikeryanComment #8
quietone CreditAttribution: quietone as a volunteer commentedOK, one line saved and fail patch.
Comment #10
mikeryanComment #11
Gábor HojtsyComment #12
Gábor HojtsyLooks good to me :) Since this is still assigned to Mike for a review from the migrate point of view, not marking RTBC.
Comment #13
mikeryanAyup.
Comment #14
alexpottCommitted and pushed 7b76b16 to 8.3.x and 759bcab to 8.2.x. Thanks!
Comment #17
Gábor HojtsyYay, thanks!
Comment #18
mikeryan