Error 500, database error on cloning existing site

"PHP message: WordPress database error Table 'wpmu.wp_214_options' doesn't exist for query SELECT option_value FROM wp_214_options WHERE option_name = 'wp_214_user_roles' LIMIT 1 made by require_once('wp-admin/network/admin.php'), require_once('wp-admin/admin.php'), do_action('load-admin_page_clone_site'), call_user_func_array, WPMUDEV_Cloner_Admin_Clone_Site->sanitize_clone_form, WPMUDEV_Cloner_Admin_Clone_Site->pre_clone_actions, create_empty_blog, switch_to_blog, WP_Roles->reinit, get_option" while reading response header from upstream, client: xxx.xxx.xxx.xxx, server: localhost, request: "POST /wp-admin/network/index.php?page=clone_site&blog_id=111&action=clone HTTP/1.1", upstream: "fastcgi://127.0.0.1:9009", host: "xxx.com", referrer: "https://xxx.com/wp-admin/network/index.php?page=clone_site&blog_id=111&action=clone"
"PHP message: WordPress database error Table 'wpmu.wp_214_options' doesn't exist for query SELECT option_value FROM wp_214_options WHERE option_name = 'wp_214_user_roles' LIMIT 1 made by require_once('wp-admin/network/admin.php'), require_once('wp-admin/admin.php'), do_action('load-admin_page_clone_site'), call_user_func_array, WPMUDEV_Cloner_Admin_Clone_Site->sanitize_clone_form, WPMUDEV_Cloner_Admin_Clone_Site->pre_clone_actions, create_empty_blog, switch_to_blog, WP_Roles->reinit, get_option" while reading response header from upstream, client: 196.210.9.197, server: localhost, request: "POST /wp-admin/network/index.php?page=clone_site&blog_id=111&action=clone HTTP/1.1", upstream: "fastcgi://127.0.0.1:9009", host: "xxx.com", referrer: "https://xxx.com/wp-admin/network/index.php?page=clone_site&blog_id=111&action=clone"2015/04/20 11:10:40

  • eXtremeSHOK

    Makes no difference.

    see the following error

    2015/04/28 21:30:37 [error] 30644#0: *16375 FastCGI sent in stderr: "PHP message: WordPress database error Table 'wpmu-webshok.wp_225_options' doesn't exist for query SELECT option_value FROM wp_225_options WHERE option_name = 'wp_225_user_roles' LIMIT 1 made by require_once('wp-admin/network/admin.php'), require_once('wp-admin/admin.php'), do_action('load-admin_page_clone_site'), call_user_func_array, WPMUDEV_Cloner_Admin_Clone_Site->sanitize_clone_form, WPMUDEV_Cloner_Admin_Clone_Site->pre_clone_actions, create_empty_blog, switch_to_blog, WP_Roles->reinit, get_option" while reading response header from upstream, client: 196.215.133.90, server: localhost, request: "POST /wp-admin/network/index.php?page=clone_site&blog_id=224&action=clone HTTP/1.1", upstream: "fastcgi://127.0.0.1:9009", host: "xxxxx.com", referrer: "https://xxxxx.com/wp-admin/network/index.php?page=clone_site&blog_id=224"
  • eXtremeSHOK

    Running adminer and manually executing the failed query.

    SELECT option_value FROM wp_225_options WHERE option_name = 'wp_225_user_roles' LIMIT 1
    option_value
    a:5:{s:13:"administrator";a:2:{s:4:"name";s:13:"Administrator";s:12:"capabilities";a:73:{s:13:"switch_themes";b:1;s:11:"edit_themes";b:1;s:16:"activate_plugins";b:1;s:12:"edit_plugins";b:1;s:10:"edit_users";b:1;s:10:"edit_files";b:1;s:14:"manage_options";b:1;s:17:"moderate_comments";b:1;s:17:"manage_categories";b:1;s:12:"manage_links";b:1;s:12:"upload_files";b:1;s:6:"import";b:1;s:15:"unfiltered_html";b:1;s:10:"edit_posts";b:1;s:17:"edit_others_posts";b:1;s:20:"edit_published_posts";b:1;s:13:"publish_posts";b:1;s:10:"edit_pages";b:1;s:4:"read";b:1;s:8:"level_10";b:1;s:7:"level_9";b:1;s:7:"level_8";b:1;s:7:"level_7";b:1;s:7:"level_6";b:1;s:7:"level_5";b:1;s:7:"level_4";b:1;s:7:"level_3";b:1;s:7:"level_2";b:1;s:7:"level_1";b:1;s:7:"level_0";b:1;s:17:"edit_others_pages";b:1;s:20:"edit_published_pages";b:1;s:13:"publish_pages";b:1;s:12:"delete_pages";b:1;s:19:"delete_others_pages";b:1;s:22:"delete_published_pages";b:1;s:12:"delete_posts";b:1;s:19:"delete_others_posts";b:1;s:22:"delete_published_posts";b:1;s:20:"delete_private_posts";b:1;s:18:"edit_private_posts";b:1;s:18:"read_private_posts";b:1;s:20:"delete_private_pages";b:1;s:18:"edit_private_pages";b:1;s:18:"read_private_pages";b:1;s:12:"delete_users";b:1;s:12:"create_users";b:1;s:17:"unfiltered_upload";b:1;s:14:"edit_dashboard";b:1;s:14:"update_plugins";b:1;s:14:"delete_plugins";b:1;s:15:"install_plugins";b:1;s:13:"update_themes";b:1;s:14:"install_themes";b:1;s:11:"update_core";b:1;s:10:"list_users";b:1;s:12:"remove_users";b:1;s:9:"add_users";b:1;s:13:"promote_users";b:1;s:18:"edit_theme_options";b:1;s:13:"delete_themes";b:1;s:6:"export";b:1;s:22:"tablepress_edit_tables";b:1;s:24:"tablepress_delete_tables";b:1;s:22:"tablepress_list_tables";b:1;s:21:"tablepress_add_tables";b:1;s:22:"tablepress_copy_tables";b:1;s:24:"tablepress_import_tables";b:1;s:24:"tablepress_export_tables";b:1;s:32:"tablepress_access_options_screen";b:1;s:30:"tablepress_access_about_screen";b:1;s:29:"tablepress_import_tables_wptr";b:1;s:23:"tablepress_edit_options";b:1;}}s:6:"editor";a:2:{s:4:"name";s:6:"Editor";s:12:"capabilities";a:43:{s:17:"moderate_comments";b:1;s:17:"manage_categories";b:1;s:12:"manage_links";b:1;s:12:"upload_files";b:1;s:15:"unfiltered_html";b:1;s:10:"edit_posts";b:1;s:17:"edit_others_posts";b:1;s:20:"edit_published_posts";b:1;s:13:"publish_posts";b:1;s:10:"edit_pages";b:1;s:4:"read";b:1;s:7:"level_7";b:1;s:7:"level_6";b:1;s:7:"level_5";b:1;s:7:"level_4";b:1;s:7:"level_3";b:1;s:7:"level_2";b:1;s:7:"level_1";b:1;s:7:"level_0";b:1;s:17:"edit_others_pages";b:1;s:20:"edit_published_pages";b:1;s:13:"publish_pages";b:1;s:12:"delete_pages";b:1;s:19:"delete_others_pages";b:1;s:22:"delete_published_pages";b:1;s:12:"delete_posts";b:1;s:19:"delete_others_posts";b:1;s:22:"delete_published_posts";b:1;s:20:"delete_private_posts";b:1;s:18:"edit_private_posts";b:1;s:18:"read_private_posts";b:1;s:20:"delete_private_pages";b:1;s:18:"edit_private_pages";b:1;s:18:"read_private_pages";b:1;s:22:"tablepress_edit_tables";b:1;s:24:"tablepress_delete_tables";b:1;s:22:"tablepress_list_tables";b:1;s:21:"tablepress_add_tables";b:1;s:22:"tablepress_copy_tables";b:1;s:24:"tablepress_import_tables";b:1;s:24:"tablepress_export_tables";b:1;s:32:"tablepress_access_options_screen";b:1;s:30:"tablepress_access_about_screen";b:1;}}s:6:"author";a:2:{s:4:"name";s:6:"Author";s:12:"capabilities";a:19:{s:12:"upload_files";b:1;s:10:"edit_posts";b:1;s:20:"edit_published_posts";b:1;s:13:"publish_posts";b:1;s:4:"read";b:1;s:7:"level_2";b:1;s:7:"level_1";b:1;s:7:"level_0";b:1;s:12:"delete_posts";b:1;s:22:"delete_published_posts";b:1;s:22:"tablepress_edit_tables";b:1;s:24:"tablepress_delete_tables";b:1;s:22:"tablepress_list_tables";b:1;s:21:"tablepress_add_tables";b:1;s:22:"tablepress_copy_tables";b:1;s:24:"tablepress_import_tables";b:1;s:24:"tablepress_export_tables";b:1;s:32:"tablepress_access_options_screen";b:1;s:30:"tablepress_access_about_screen";b:1;}}s:11:"contributor";a:2:{s:4:"name";s:11:"Contributor";s:12:"capabilities";a:5:{s:10:"edit_posts";b:1;s:4:"read";b:1;s:7:"level_1";b:1;s:7:"level_0";b:1;s:12:"delete_posts";b:1;}}s:10:"subscriber";a:2:{s:4:"name";s:10:"Subscriber";s:12:"capabilities";a:2:{s:4:"read";b:1;s:7:"level_0";b:1;}}}
  • eXtremeSHOK

    Appears this module is not compatible with ninjafirewall+ webfilter for wordpress.
    If the webfilter option is enabled: error500.
    I have disabled the webfilter option and the cloner works correctly.

    However the errors in the log still exist, due to the SELECT being before the create.

    2015/04/28 22:50:28 [error] 30644#0: *16375 FastCGI sent in stderr: "PHP message: WordPress database error Table 'wpmu-webshok.wp_239_options' doesn't exist for query SELECT option_value FROM wp_239_options WHERE option_name = 'wp_239_user_roles' LIMIT 1 made by require_once('wp-admin/network/admin.php'), require_once('wp-admin/admin.php'), do_action('load-admin_page_clone_site'), call_user_func_array, WPMUDEV_Cloner_Admin_Clone_Site->sanitize_clone_form, WPMUDEV_Cloner_Admin_Clone_Site->pre_clone_actions, create_empty_blog, switch_to_blog, WP_Roles->reinit, get_option" while reading response header from upstream, client: 196.215.133.90, server: localhost, request: "POST /wp-admin/network/index.php?page=clone_site&blog_id=231&action=clone HTTP/1.1", upstream: "fastcgi://127.0.0.1:9009", host: "webshok.com", referrer: "https://webshok.com/wp-admin/network/index.php?page=clone_site&blog_id=231"
    2015/04/28 22:50:33 [error] 30644#0: *16375 FastCGI sent in stderr: "PHP message: WordPress database error Table 'wpmu-webshok.wp_mcc_nbt_relationship' doesn't exist for query DELETE FROM wp_mcc_nbt_relationship WHERE  blog_id = 0 made by do_action('wp_ajax_copier_process_copy_action'), call_user_func_array, copier_process_ajax_template, copier_process_copy, Site_Copier_Settings->copy, switch_theme, do_action('switch_theme'), call_user_func_array, MCC_NBT_Integrator->delete_blog_relationships_on_switch_theme, Multisite_Content_Copier_NBT_Model->delete_relationships" while reading response header from upstream, client: 196.215.133.90, server: localhost, request: "POST /wp-admin/admin-ajax.php HTTP/1.1", upstream: "fastcgi://127.0.0.1:9009", host: "test44.webshok.com", referrer: "https://test44.webshok.com/wp-admin/"
    2015/04/28 22:50:35 [error] 30644#0: *16375 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Cannot use object of type WP_Error as array in /var/www/webshok.com/public/wp-content/plugins/cloner/copier/class.copier-pages.php on line 33" while reading response header from upstream, client: 196.215.133.90, server: localhost, request: "POST /wp-admin/admin-ajax.php HTTP/1.1", upstream: "fastcgi://127.0.0.1:9009", host: "test44.webshok.com", referrer: "https://test44.webshok.com/wp-admin/"