Skip to content

Database error when switch_to_blog() is used

Home Forums Troubleshooting Database error when switch_to_blog() is used

This topic contains 2 replies, has 2 voices, and was last updated by 9 months, 3 weeks ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • #22720 Reply


    Sometime after updating to Press Permit version 2.3.17 or 2.3.18, I started getting database errors on pages where I use switch_to_blog() on a blog with Press Permit activated to fetch content from a blog with Press Permit deactivated (on my WordPress multisite).

    Here’s a typical error message:

    WordPress database error Table ‘wp_production.wp_4_ppc_exceptions’ doesn’t exist for query SELECT e.operation, e.for_item_source, e.for_item_type, e.mod_type, e.via_item_source, e.via_item_type, e.for_item_status, i.item_id, i.assign_for FROM wp_4_ppc_exceptions AS e INNER JOIN wp_4_ppc_exception_items AS i ON e.exception_id = i.exception_id WHERE ( 1=1 AND e.operation IN (‘read’) AND i.assign_for = ‘item’ AND ( ( e.for_item_source = ‘post’ AND e.for_item_type IN (”, ‘post’,’page’) ) OR ( e.for_item_source = ‘term’ AND e.for_item_type IN (”, ‘category’,’post_tag’,’nav_menu’) ) OR ( e.for_item_source = ‘pp_group’ ) ) AND e.for_item_status IN (”,’post_status:private’,’post_status:draft’) ) AND ( ( e.agent_type = ‘user’ AND e.agent_id = ‘1’ ) OR ( e.agent_type = ‘pp_group’ AND e.agent_id IN (‘1’, ‘8’, ‘7’) ) ) made by require(‘wp-blog-header.php’), require_once(‘wp-includes/template-loader.php’), include(‘/themes/timber-gc/page-templates/landing.php’), get_field, acf_format_value, apply_filters(‘acf/format_value/type=flexible_content’), WP_Hook->apply_filters, acf_field_flexible_content->format_value, acf_format_value, apply_filters(‘acf/format_value/type=wysiwyg’), WP_Hook->apply_filters, acf_field_wysiwyg->format_value, apply_filters(‘acf_the_content’), WP_Hook->apply_filters, do_shortcode, preg_replace_callback, do_shortcode_tag, gc_shortcode_news_and_events, gc_run_on_another_site, {closure}, get_posts, WP_Query->query, WP_Query->get_posts, get_term_by, get_terms, WP_Term_Query->query, WP_Term_Query->get_terms, apply_filters(‘terms_clauses’), WP_Hook->apply_filters, PP_TermsInterceptor->flt_terms_clauses, PP_User->get_exception_terms, PP_User->retrieve_exceptions, ppc_get_exceptions, PP_GroupRetrieval::get_exceptions, QM_DB->query

    I’m currently on 2.3.19 and the error messages continue to occur. Any ideas?


    Micah Miller-Eshleman
    Web Developer at Goshen College

    #22722 Reply

    [ login required ]

    #22818 Reply

    [ login required ]

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.

Registered members have full access to Pro support forums here.

Feel free to log in or purchase a support key.