Can’t add new post when Yoast SEO is activated
-
Hi,
Thank you for this plugin I have been using for a few years.
I have a blog section on my e-commerce website. Thing is, since the last update my blog posts categories disappeared, and trying to reassign them would have no effect. My posts all fall under “Uncategorized”.
Also, and more important, I can’t add a new post or duplicate one.This conflicts disappear when deactivating the plugin.
My WP installation and plugins are all up-to-date.The debug.log says : PHP Recoverable fatal error: Object of class WP_Term could not be converted to string in /wp-includes/taxonomy.php on line 2334
The concerned line is this one :
$in_delete_tt_ids = "'" . implode( "', '", $delete_tt_ids ) . "'";
In the following section :
/** * Fires immediately after an object-term relationship is added. * * @since 2.9.0 * @since 4.7.0 Added the <code>$taxonomy</code> parameter. * * @param int $object_id Object ID. * @param int $tt_id Term taxonomy ID. * @param string $taxonomy Taxonomy slug. */ do_action( 'added_term_relationship', $object_id, $tt_id, $taxonomy ); $new_tt_ids[] = $tt_id; } if ( $new_tt_ids ) wp_update_term_count( $new_tt_ids, $taxonomy ); if ( ! $append ) { $delete_tt_ids = array_diff( $old_tt_ids, $tt_ids ); if ( $delete_tt_ids ) { $in_delete_tt_ids = "'" . implode( "', '", $delete_tt_ids ) . "'"; $delete_term_ids = $wpdb->get_col( $wpdb->prepare( "SELECT tt.term_id FROM $wpdb->term_taxonomy AS tt WHERE tt.taxonomy = %s AND tt.term_taxonomy_id IN ($in_delete_tt_ids)", $taxonomy ) ); $delete_term_ids = array_map( 'intval', $delete_term_ids ); $remove = wp_remove_object_terms( $object_id, $delete_term_ids, $taxonomy ); if ( is_wp_error( $remove ) ) { return $remove; } } }
When trying to duplicate a post it gives me an error on line 2331, same file.
Would you have an idea on how to solve this problem ?
Thank you for your help.
- The topic ‘Can’t add new post when Yoast SEO is activated’ is closed to new replies.