Hi Yoast support,
I have some code updating post metadata as follows:
update_post_meta( $wpPageId, $key = ‘_yoast_wpseo_title’, $value = $pageMetadata[“seoTitle”]);
wp_update_post($wpPageId);
The above code is working with PHP 7.4. But when updating to PHP 8, this line: wp_update_post($wpPageId); produces a critical error.
To fix this I changed the $wpPageId to an array like so:
$wpPageIdArray = array(
‘ID’ => $wpPageId
);
wp_update_post($wpPageIdArray);
The problem is that now with this updated code I’m recieving WordPress Data base errors as follows:
WordPress database error: [Unknown column ‘indexable_id’ in ‘where clause’]DELETE FROM wp_yoast_seo_links WHERE post_id = ‘8’ AND indexable_id IS NULL /* From [example.com/] in [path/wp-content/plugins/wordpress-seo/lib/orm.php:287]
and
WordPress database error: [Unknown column ‘target_indexable_id’ in ‘field list’]SELECT COUNT( id ) AS incoming, target_indexable_id FROM wp_yoast_seo_links WHERE target_indexable_id IN (‘1230’, ‘6632’, ’73’, ‘6695’, ‘100’, ‘5126’, ’92’, ‘100’, ‘6691’, ‘3’, ‘5126’, ’92’, ‘229’, ’73’, ’73’, ’73’, ’73’, ’73’, ’73’, ’73’, ’73’, ’73’, ‘100’) GROUP BY target_indexable_id /* From [example.com/] in [path/wp-content/plugins/wordpress-seo/lib/orm.php:287]
I would really appreciate any help you can give me about what I’m doing wrong?
- This topic was modified 8 hours, 50 minutes ago by .
