Haven't tried to debug this any further, and it's possible this is something unique to the test site where I'm doing this import, but I have a clean copy of core, tw, migrate, and a handful of standard module (views, cck, token, etc) plus ubercart. Whenever tw is enabled and I clear my views cache, I get the following error:

warning: array_merge_recursive() [function.array-merge-recursive]: recursion detected in /.../includes/module.inc on line 473.

That's in module_invoke_all():

$return = array_merge_recursive($return, $result);

I at least narrowed it down to hook_views_default_views. If I just have tw_views_default_views() return immediately, the error goes away. No time now to look closer, but wanted to open an issue about it in case anyone has any bright ideas.

Thanks,
-Derek

Comments

mikeryan’s picture

Status: Active » Postponed (maintainer needs more info)

Googling around, the phrase "seems to occur randomly" is highly associated with this message. Without a reproducible case, there's little we can do. The one thing I can suggest is disabling "Provide default view" for one of your TW tables at a time to see if one specific table is triggering this.

dww’s picture

Status: Postponed (maintainer needs more info) » Active

Good idea (although, wow, the tw UI doesn't make that task very easy...) ;)

Tracked it down to this. The legacy DB I'm importing from has a table named "calendar". If I leave the default view name as "calendar", I get the error and no view actually shows up. If I rename it to "foo_calendar", the error goes away. Here's the view export in case this is helpful:

$view = new view;
$view->name = 'foo_calendar';
$view->description = 'calendar';
$view->tag = 'tw';
$view->view_php = '';
$view->base_table = 'calendar';
$view->is_cacheable = FALSE;
$view->api_version = 2;
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
$handler = $view->new_display('default', 'oscomm_calendar', 'default');
$handler->override_option('fields', array(
  'calendar_id' => array(
    'id' => 'calendar_id',
    'table' => 'calendar',
    'field' => 'calendar_id',
    'label' => 'calendar_id',
    'exclude' => 0,
    'relationship' => 'none',
  ),
  'calendar_date' => array(
    'id' => 'calendar_date',
    'table' => 'calendar',
    'field' => 'calendar_date',
    'label' => 'calendar_date',
    'exclude' => 0,
    'relationship' => 'none',
  ),
  'calendar_title' => array(
    'id' => 'calendar_title',
    'table' => 'calendar',
    'field' => 'calendar_title',
    'label' => 'calendar_title',
    'exclude' => 0,
    'relationship' => 'none',
  ),
  'calendar_text' => array(
    'id' => 'calendar_text',
    'table' => 'calendar',
    'field' => 'calendar_text',
    'label' => 'calendar_text',
    'exclude' => 0,
    'relationship' => 'none',
  ),
  'calendar_state' => array(
    'id' => 'calendar_state',
    'table' => 'calendar',
    'field' => 'calendar_state',
    'label' => 'calendar_state',
    'exclude' => 0,
    'relationship' => 'none',
  ),
  'calendar_link' => array(
    'id' => 'calendar_link',
    'table' => 'calendar',
    'field' => 'calendar_link',
    'label' => 'calendar_link',
    'exclude' => 0,
    'relationship' => 'none',
  ),
  'calendar_lang' => array(
    'id' => 'calendar_lang',
    'table' => 'calendar',
    'field' => 'calendar_lang',
    'label' => 'calendar_lang',
    'exclude' => 0,
    'relationship' => 'none',
  ),
  'calendar_smalltext' => array(
    'id' => 'calendar_smalltext',
    'table' => 'calendar',
    'field' => 'calendar_smalltext',
    'label' => 'calendar_smalltext',
    'exclude' => 0,
    'relationship' => 'none',
  ),
  'calendar_image' => array(
    'id' => 'calendar_image',
    'table' => 'calendar',
    'field' => 'calendar_image',
    'label' => 'calendar_image',
    'exclude' => 0,
    'relationship' => 'none',
  ),
  'calendar_city' => array(
    'id' => 'calendar_city',
    'table' => 'calendar',
    'field' => 'calendar_city',
    'label' => 'calendar_city',
    'exclude' => 0,
    'relationship' => 'none',
  ),
  'calendar_author' => array(
    'id' => 'calendar_author',
    'table' => 'calendar',
    'field' => 'calendar_author',
    'label' => 'calendar_author',
    'exclude' => 0,
    'relationship' => 'none',
  ),
  'calendar_book' => array(
    'id' => 'calendar_book',
    'table' => 'calendar',
    'field' => 'calendar_book',
    'label' => 'calendar_book',
    'exclude' => 0,
    'relationship' => 'none',
  ),
));
$handler->override_option('access', array(
  'type' => 'perm',
  'perm' => 'table wizard administration',
));
$handler->override_option('cache', array(
  'type' => 'none',
));
$handler->override_option('title', 'Contents of calendar');
$handler->override_option('header', 'This is a view of a raw database table. It may be sorted in various ways by clicking the column headers.

      If you identify a particular field that does not need to be used in views of this table, go to the <a href="/admin/content/tw/analyze/6">analysis page</a> and check the <em>Ignore</em> box for that field. It will then no longer appear here.');
$handler->override_option('header_format', '1');
$handler->override_option('header_empty', 0);
$handler->override_option('empty', 'There are no rows in this table.');
$handler->override_option('empty_format', '1');
$handler->override_option('items_per_page', 25);
$handler->override_option('use_pager', '1');
$handler->override_option('style_plugin', 'table');
$handler->override_option('style_options', array(
  'grouping' => '',
  'override' => 1,
  'sticky' => 1,
  'order' => 'asc',
  'columns' => array(
    'calendar_id' => 'calendar_id',
    'calendar_date' => 'calendar_date',
    'calendar_title' => 'calendar_title',
    'calendar_text' => 'calendar_text',
    'calendar_state' => 'calendar_state',
    'calendar_link' => 'calendar_link',
    'calendar_lang' => 'calendar_lang',
    'calendar_smalltext' => 'calendar_smalltext',
    'calendar_image' => 'calendar_image',
    'calendar_city' => 'calendar_city',
    'calendar_author' => 'calendar_author',
    'calendar_book' => 'calendar_book',
  ),
  'info' => array(
    'calendar_id' => array(
      'sortable' => 1,
      'separator' => '',
    ),
    'calendar_date' => array(
      'sortable' => 1,
      'separator' => '',
    ),
    'calendar_title' => array(
      'sortable' => 1,
      'separator' => '',
    ),
    'calendar_text' => array(
      'sortable' => 1,
      'separator' => '',
    ),
    'calendar_state' => array(
      'sortable' => 1,
      'separator' => '',
    ),
    'calendar_link' => array(
      'sortable' => 1,
      'separator' => '',
    ),
    'calendar_lang' => array(
      'sortable' => 1,
      'separator' => '',
    ),
    'calendar_smalltext' => array(
      'sortable' => 1,
      'separator' => '',
    ),
    'calendar_image' => array(
      'sortable' => 1,
      'separator' => '',
    ),
    'calendar_city' => array(
      'sortable' => 1,
      'separator' => '',
    ),
    'calendar_author' => array(
      'sortable' => 1,
      'separator' => '',
    ),
    'calendar_book' => array(
      'sortable' => 1,
      'separator' => '',
    ),
  ),
  'default' => -1,
));
$handler = $view->new_display('page', 'Page', 'page_1');
$handler->override_option('path', 'admin/content/tw/view/foo_calendar');
$handler->override_option('menu', array(
  'type' => 'none',
  'title' => '',
  'description' => '',
  'weight' => 0,
  'name' => 'navigation',
));
$handler->override_option('tab_options', array(
  'type' => 'none',
  'title' => '',
  'description' => '',
  'weight' => 0,
));

No time to further debug this. I'm not sure what the "bug" is. Perhaps it's just a UI thing, and tw should detect collisions like this and provide a more meaningful error. Maybe something's actually going wrong under the covers. Although I have calendar module enabled on this site, I don't have any calendar views configured, so I'm not sure what the conflict even is...

mikeryan’s picture

Status: Active » Closed (duplicate)

OK, this looks like another symptom of #617142: Horrible collisions of death when adding a table w/ same name as Drupal table or existing view - the views structure for the external calendar table collides with the one for the calendar module's table...

Thanks for further diagnosing this.

dww’s picture

Status: Closed (duplicate) » Active

calendar module has no such {calendar} table, so I don't think that's directly the problem...

mikeryan’s picture

Status: Active » Closed (duplicate)

Calendar does create a view named calendar. It's not technically a collision of tables, it's a collision of views structures.