Yes, the error happens on every theme switch. Even if I remove all other non-stock themes (and leave only twenty-* themes).
What exact directory would be error logs of this type of bug be located?
The best I can provide for a reference to the error is this code that comes to the page when errors appear:
[/var/www/coach-sites/loader.php:31](#0) : {"level": "E_WARNING",
"message": "array_search() expects parameter 2 to be array, null given",
"file": "\/var\/www\/coach-sites\/public\/wp-includes\/widgets.php",
"line": 1326,
"line_string": "$active_key = array_search( $widget_id, $new_widgets, true );",
"backtrace": [
{"file": "\/wp-includes\/widgets.php",
"line": 1326,
"function": "array_search",
"line_string": "$active_key = array_search( $widget_id, $new_widgets, true );",
"args": [
"ac_contact_details-2",
null,
true]},
{"file": "\/wp-includes\/widgets.php",
"line": 1156,
"function": "wp_map_sidebars_widgets",
"line_string": "$sidebars_widgets = wp_map_sidebars_widgets( $sidebars_widgets );",
"args": [
[]]},
{"file": "\/wp-includes\/widgets.php",
"line": 1114,
"function": "retrieve_widgets",
"line_string": "retrieve_widgets(true);",
"args": [
true]},
{"file": "\/wp-includes\/class-wp-hook.php",
"line": 288,
"function": "_wp_sidebars_changed",
"line_string": "$value = call_user_func_array( $the_['function'], array_slice( $args, 0, (int)$the_['accepted_args'] ) );",
"args": [
"yourcoach"]},
{"file": "\/wp-includes\/class-wp-hook.php",
"line": 310,
"class": "WP_Hook->",
"function": "apply_filters",
"line_string": "$this->apply_filters( '', $args );",
"args": [
null,
["yourcoach",
{"update": false}]]},
{"file": "\/wp-includes\/plugin.php",
"line": 453,
"class": "WP_Hook->",
"function": "do_action",
"line_string": "$wp_filter[ $tag ]->do_action( $args );",
"args": [
["yourcoach",
{"update": false}]]},
{"file": "\/wp-includes\/theme.php",
"line": 2749,
"function": "do_action",
"line_string": "do_action( 'after_switch_theme', $old_theme->get( 'Name' ), $old_theme );",
"args": [
"after_switch_theme",
"yourcoach",
{"update": false}]},
{"file": "\/wp-includes\/class-wp-hook.php",
"line": 286,
"function": "check_theme_switched",
"line_string": "$value = call_user_func_array( $the_['function'], $args );",
"args": [
""]},
{"file": "\/wp-includes\/class-wp-hook.php",
"line": 310,
"class": "WP_Hook->",
"function": "apply_filters",
"line_string": "$this->apply_filters( '', $args );",
"args": [
null,
[""]]},
{"file": "\/wp-includes\/plugin.php",
"line": 453,
"class": "WP_Hook->",
"function": "do_action",
"line_string": "$wp_filter[ $tag ]->do_action( $args );",
"args": [
[""]]},
{"file": "\/wp-settings.php",
"line": 450,
"function": "do_action",
"line_string": "do_action( 'init' );",
"args": [
"init"]},
{"file": "\/wp-config.php",
"line": 107,
"function": "require_once",
"line_string": "require_once(ABSPATH . 'wp-settings.php');\r",
"args": [
"\/var\/www\/coach-sites\/public\/wp-settings.php"]},
{"file": "\/wp-load.php",
"line": 43,
"function": "require_once",
"line_string": "require_once( ABSPATH . 'wp-config.php' );",
"args": [
"\/var\/www\/coach-sites\/public\/wp-config.php"]},
{"file": "\/wp-admin\/admin.php",
"line": 31,
"function": "require_once",
"line_string": "require_once(dirname(dirname(__FILE__)) . '\/wp-load.php');",
"args": [
"\/var\/www\/coach-sites\/public\/wp-load.php"]},
{"file": "\/wp-admin\/themes.php",
"line": 10,
"function": "require_once",
"line_string": "require_once( dirname( __FILE__ ) . '\/admin.php' );",
"args": [
"\/var\/www\/coach-sites\/public\/wp-admin\/admin.php"]}],
"context": {
"rid": "sEArfKRagM",
"pid": 8421,
"time": "2018-06-13T03:15:52.3853640+00:00",
"$_SERVER": {
"SERVER_SOFTWARE": "Apache\/2.4.18 (Ubuntu)",
"REQUEST_URI": "\/wp-admin\/themes.php?activated=true",
"HTTPS": "on",
"SSL_TLS_SNI": "kevinstansfield.actioncoach.com",
"HTTP_HOST": "kevinstansfield.actioncoach.com",
"HTTP_CONNECTION": "keep-alive",
"HTTP_UPGRADE_INSECURE_REQUESTS": "1",
"HTTP_DNT": "1",
"HTTP_USER_AGENT": "Mozilla\/5.0 (Macintosh; Intel Mac OS X 10_13_4) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/67.0.3396.87 Safari\/537.36",
"HTTP_ACCEPT": "text\/html,application\/xhtml+xml,application\/xml;q=0.9,image\/webp,image\/apng,*\/*;q=0.8",
"HTTP_REFERER": "https:\/\/kevinstansfield.actioncoach.com\/wp-admin\/themes.php",
"HTTP_ACCEPT_ENCODING": "gzip, deflate, br",
"HTTP_ACCEPT_LANGUAGE": "en-GB,en-US;q=0.9,en;q=0.8,zh-CN;q=0.7,zh;q=0.6,ja;q=0.5,fr;q=0.4",
"HTTP_COOKIE": "wordpress_sec_a8726bd570f47aaa9e8db6a160c1d5ab=superaction%7C1529031530%7Cp8hgz7NhMKZOBcNc0cfsHPVmQrVdhlbMTnCW3Qi0nFl%7C38793c7c408220dfa904b1b1cdb58ff01be51335201402d893f72c7e95874945; wordpress_test_cookie=WP+Cookie+check; wordpress_logged_in_a8726bd570f47aaa9e8db6a160c1d5ab=superaction%7C1529031530%7Cp8hgz7NhMKZOBcNc0cfsHPVmQrVdhlbMTnCW3Qi0nFl%7Cc314464f4cf980720caa63cfb1c48125056c6440bf1105e77dce70a3704a61fb; _ga=GA1.2.39112248.1528858784; _gid=GA1.2.1502254892.1528858784",
"PATH": "\/usr\/local\/sbin:\/usr\/local\/bin:\/usr\/sbin:\/usr\/bin:\/sbin:\/bin",
"SERVER_SIGNATURE": "",
"SERVER_NAME": "kevinstansfield.actioncoach.com",
"SERVER_ADDR": "172.99.124.106",
"SERVER_PORT": "443",
"REMOTE_ADDR": "70.170.109.188",
"DOCUMENT_ROOT": "\/var\/www\/coach-sites\/public",
"REQUEST_SCHEME": "https",
"CONTEXT_PREFIX": "",
"CONTEXT_DOCUMENT_ROOT": "\/var\/www\/coach-sites\/public",
"SERVER_ADMIN": "webmaster@localhost",
"SCRIPT_FILENAME": "\/var\/www\/coach-sites\/public\/wp-admin\/themes.php",
"REMOTE_PORT": "50230",
"GATEWAY_INTERFACE": "CGI\/1.1",
"SERVER_PROTOCOL": "HTTP\/1.1",
"REQUEST_METHOD": "GET",
"QUERY_STRING": "activated=true",
"SCRIPT_NAME": "\/wp-admin\/themes.php",
"PHP_SELF": "\/wp-admin\/themes.php",
"REQUEST_TIME_FLOAT": "1528859752.361",
"REQUEST_TIME": "1528859752"},
"$_POST": [],
"$_GET": {
"activated": "true"}}}