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.
Migrating a Drupal 6.x (6.38) without any translations fails when trying to migrate i18n variables with the following output:
Migration failed with source plugin exception: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'db_name.prefix_i18n_variable' doesn't exist:
SELECT v.*
FROM
{i18n_variable} v
WHERE name IN (:db_condition_placeholder_0); Array
(
[:db_condition_placeholder_0] => site_offline_message
)
Activating and installing Locale module on the 6.x installation makes no difference. In fact I can't find any reference to i18n_variable
at all in the 6.x core download.
Comment | File | Size | Author |
---|---|---|---|
#9 | 屏幕快照 2017-06-25 下午3.06.44.png | 282.31 KB | hellobank |
Comments
Comment #2
mikeryanWhich specific migration was it that failed? Seems some migration is missing a dependency on i18n...
Comment #3
NiklasBr CreditAttribution: NiklasBr commenteddrush migrate-upgrade --legacy-db-url=mysql://user:password@server/database--legacy-root=path/to/files --legacy-db-prefix='prefix'
Or did you ask something else?
Comment #4
mikeryanI asked which specific migration generated the error. When you run the migrations, you should see feedback on the ones that are running - prefix_d6_user, prefix_d6_file, etc...
Comment #5
NiklasBr CreditAttribution: NiklasBr commentedupgrade_d6_dblog_settings, upgrade_d6_i18n_system_maintenance, upgrade_user_picture_entity_form_display, upgrade_action_settings, upgrade_d6_user_role.
Comment #6
hellobank CreditAttribution: hellobank commentedI got the same error message when I migrate D6 to D8 :
Comment #7
quietone CreditAttribution: quietone as a volunteer commentedThe i18n migrations should only be discovered if the config_translation module is enabled on the destination. Was config_translation enabled when the migrations were configured?
And regarding translating variables on D6, both the i18n module and the Variable module need to be installed.
Comment #8
hellobank CreditAttribution: hellobank commentedthank U quietone. I will try it.
Comment #9
hellobank CreditAttribution: hellobank commentedJust enabled Internationalization and String translation module, the problem fixed.
thanks again quietone.
Comment #10
NiklasBr CreditAttribution: NiklasBr commentedOn the D6 system where I have no memory of ever having installed any i18n module:
SELECT * FROM prefix_system WHERE filename LIKE "%18n%"
0 rows
SELECT * FROM prefix_system WHERE filename LIKE "%variable%"
0 rows
Are they part of D6 core?
Comment #11
quietone CreditAttribution: quietone as a volunteer commentedFinally saw the cause of this.
The problem is that the source provider on the VocabularyTranslation source plugin is 'taxonomy' and not 'i18n' or 'i18ntaxonomy'. So, as far as the migration is concerned all it needs is the taxonomy module enabled on the source. When it fact it needs the i18n tables.
The fix is to change core/modules/taxonomy/src/Plugin/migrate/source/d6/VocabularyTranslation.php:12 from
* source_provider = "taxonomy"
to
* source_provider = "i18ntaxonomy"
This is fixed in #2569805: For Drupal migration, identify the source module which is at RTBC and there is a work around of installing and enabling the i18n modules. See #9. Therefor changing status to won't fix. Reopen if you disagree.