killsig
Forum Replies Created
-
I put this at the top of my wp-config.php, inside the php tag of course. Hides the errors for now. ??
ini_set(‘display_errors’,’Off’);
ini_set(‘error_reporting’, E_ALL );
define(‘WP_DEBUG’, false);
define(‘WP_DEBUG_DISPLAY’, false);Thanks @scarpinoc
I was thinking this would be the temporary resolution as well.
Forum: Plugins
In reply to: [CPT-onomies: Using Custom Post Types as Taxonomies] Updates are comingThe boss upgraded one of our clients sites to 4.7 and then gave me the exciting job of making the site load again. ??
I’m not a wordpress guru but did find a work-around that got our site loading. This is a temporary solution that worked for us until the plugin is updated. I do recommend using the solution provided by the plugin developer once it’s available and reverting changes to category-template.php.
2 files needed to be changed but the first one got the site loading with minor issues.
In file:
wp-content/plugins/cpt-onomies/cpt-onomy.phpI commented out the following line (around line 1448)
changed from:
'post_type' => $taxonomy,
to:
//'post_type' => $taxonomy,
This got our pages loading but we noticed strange results in some of our queries.
I traced this back to what looks like a function that was grabbing cached terms
In this file:
wp-includes/category-template.phpI changed the get_the_terms function (around line 1159). I basically made sure the terms were new instead of using the cache. This may or may not have to be done. It may have been related to me moving the site to another server or something like that.
From:
$terms = get_object_term_cache( $post->ID, $taxonomy );
if ( false === $terms ) {
$terms = wp_get_object_terms( $post->ID, $taxonomy );
if ( ! is_wp_error( $terms ) ) {
$term_ids = wp_list_pluck( $terms, ‘term_id’ );
wp_cache_add( $post->ID, $term_ids, $taxonomy . ‘_relationships’ );
}
}To:
//$terms = get_object_term_cache( $post->ID, $taxonomy );
//if ( false === $terms ) {
$terms = wp_get_object_terms( $post->ID, $taxonomy );
if ( ! is_wp_error( $terms ) ) {
$term_ids = wp_list_pluck( $terms, ‘term_id’ );
wp_cache_add( $post->ID, $term_ids, $taxonomy . ‘_relationships’ );
}
//}