Hi
I've a migration class 'ProductMigration' declared as 'Products' (see code snippet).
But when I check this in the UI, I see 's' as the name (see screenshot).
When I change the name from 'Products' to 'Product' all is well. But I want to use 'Products' as the name.
If I add letters after the 's' in 'Products', everything from the 's' to the end is shown.
I suppose that everything I've done is correct because the product migration is the only migration where I'm having this issue.
Thanks in advance for helping me out.
function tadaaz_migrate_migrate_api()
{
$api = array(
'api' => 2,
'groups' => array(
'tax' => array(
'title' => t('Taxonomy migrations'),
),
'product' => array(
'title' => t('Product/Staffel migrations'),
),
),
'migrations' => array(
'Colors' => array(
'class_name' => 'ColorMigration',
'group_name' => 'tax',
),
'Styles' => array(
'class_name' => 'StyleMigration',
'group_name' => 'tax',
),
'Products' => array(
'class_name' => 'ProductMigration',
'group_name' => 'product',
),
'Staffels' => array(
'class_name' => 'StaffelMigration',
'group_name' => 'product',
),
),
);
return $api;
}
Comments
Comment #1
mikeryanIs it possible some hidden extended character crept in before the 's' in 'Products'? What does the query
report?
Comment #2
yerlix commentedI've included a screenshot with the result.
All looks normal to me so far.
Comment #3
mikeryanAh, I get it now - the group machine name is 'product', and that gets stripped when it prefixes a migration (just on display, everything will work as it should). The motivation for this is that migration generators like migrate_d2d and wordpress_migrate prepend the group name to each migration name for disambiguation - the idea is that a list of migrations like 'Users', 'Pages', 'Comments' looks cleaner than 'MyOldLegacyBlogSiteUsers', 'MyOldLegacyBlogSitePages', 'MyOldLegacyBlogSiteComments'... I've been tempted before to take that out, this is a concrete reason to do that.
Comment #4
mikeryan@yerlix, does this patch fix it for you?
Comment #8
mikeryanRerolled.
Comment #9
mikeryanComment #11
mikeryanCommitted.