Scenario:
1) Installed OG module
2) Overriden og_php_ron
3) Bulk export to an include file, system will give error :
warning: array_merge_recursive() [function.array-merge-recursive]: recursion detected in /includes/module.inc on line 473.

My solution so far is to prefix the Views name with the module name, but I don't know if it's the right direction for a generalized patch. If it's the right solution I can provide a patch.

Comments

merlinofchaos’s picture

It is not technically valid to export the same view in two modules; the name IS meant to be unique, and in a module theoretically you can test for that.

I guess it could be considered a bug that Views does not handle this gracefully, though I can also provide the workaround of "Don't do that". =)

dawehner’s picture

Shouldn't this be possible with using array_merge instead of array_merge_recursive

dodorama’s picture

simply change the name of the exported view in something like default_view_overridden?

kenorb’s picture

Yes, it's caused by duplicated exported views. Thanks.

Here is backtrace:

Backtrace: array_merge_recursive(...)[module.inc:473] <=module_invoke_all(a:1:{i:0;s:19:"views_default_views";})[cache.inc:110] <=_views_discover_default_views(Array)[views.module:730] <=views_discover_default_views(Array)[views.module:805] <=views_get_all_views(Array)[views.module:751] <=views_get_applicable_views(a:1:{i:0;s:14:"uses hook menu";})[views.module:182] <=views_menu_alter(...)[:] <=call_user_func_array(...)[common.inc:2830] <=drupal_alter(...)[menu.inc:1703] <=menu_router_build(a:1:{i:0;b:1;})[menu.inc:1673] <=menu_rebuild(Array)[admin.inc:918] <=views_ui_edit_view_form_submit(...)[form.inc:774] <=form_execute_handlers(...)[form.inc:414] <=drupal_process_form(...)[form.inc:119] <=drupal_get_form(...)[admin.inc:955] <=template_preprocess_views_ui_edit_view(...)[:] <=call_user_func_array(...)[theme.inc:658] <=theme(...)[admin.inc:715] <=views_ui_edit_page(...)[:] <=call_user_func_array(...)[menu.inc:348] <=menu_execute_active_handler(Array)[index.php:18] <=index.php
amitaibu’s picture