Closed (fixed)
Project:
Migrate
Version:
6.x-1.0
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
23 Aug 2010 at 20:45 UTC
Updated:
13 Apr 2011 at 21:21 UTC
Using the code created on the export tab of a content set, the content set is not fully imported when called from a hook_install(). Views is not accessible during a hook_install() - as noted in migrate.module itself. The code in the export tab should make note of this in order to alert the user. The line I needed to change was -
migrate_save_content_set($content_set);
to
migrate_save_content_set($content_set, array('base_table' => 'table_name'));
I envision the export code should say something like -
migrate_save_content_set($content_set);
// when used in hook_install(), use this line instead
// migrate_save_content_set($content_set, array('base_table' => 'table_name'));
This is not a straightforward workaround and should be noted for usability. The export tab is meant for a copy-and-paste experience, but this issue complicates that.
Comments
Comment #1
erikwebb commentedWrong version noted.
Comment #2
mikeryanComment added, thanks!