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

erikwebb’s picture

Version: 6.x-1.0-rc1 » 6.x-1.0

Wrong version noted.

mikeryan’s picture

Status: Active » Fixed

Comment added, thanks!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.