Open vdwijngaert opened 3 years ago
Thank you @vdwijngaert for your feedback.
We have added a fix in version 5.2.
You can test it by replacing line 389 in wp-content/plugins/wp-seopress/inc/functions/options-social.php by this one:
if (!is_wp_error( $my_post_language_details ) && !empty($my_post_language_details['locale']) && $my_post_language_details['different_language'] === true) {
ETA: this week.
This issue is in regards to this line of code:
https://github.com/wp-seopress/wp-seopress-public/blob/66ce66818c3a691d2b4560e3f82fe126f4710a1f/inc/functions/options-social.php#L387
In some cases, the
wpml_post_language_details
filter can return aWP_Error
. Those cases are currently improperly handled. I just ran into an issue with an old translation record that points to a post that has since been deleted. This results in a fatal error:The code that handles this at WPMLs part:
I'm amazed they don't mention this in their documentation though.