Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not updating the OG:data when adding/removing featured images via other plugins #17721

Open
2 tasks done
Telsenome opened this issue Nov 26, 2021 · 5 comments
Open
2 tasks done

Comments

@Telsenome
Copy link

Telsenome commented Nov 26, 2021

  • I've read and understood the contribution guidelines.
  • I've searched for any related issues and avoided creating a duplicate issue.

Please give us a description of what happened.

When altering the featured image of a blogpost in any way (removing/adding/changing) using the plugin Quick Featured Images (https://wordpress.org/plugins/quick-featured-images/) the OG data in Yoast doesn’t update accordingly. So if an image was removed, it will still be present in the OG data until one opens the post and updates it from the standard update button (https://imgur.com/a/upCu6SQ). If the featured image has been changed to a new one the old will be present until the post is updated that way.

I’m talking about these fields (can be seen on on individual posts in the Rest API response): https://imgur.com/a/juys7gV

How can we reproduce this behavior?

  1. Install https://wordpress.org/plugins/quick-featured-images/
  2. Remove/add/change the image on a post using the options the plugin enables (https://i.imgur.com/Koa38ou.png)
  3. Check the OG data in the Rest API response. It won't have updated accordingly.

Technical info

  • WordPress version: 5.8.2
  • Yoast SEO version: 17.5
  • Quick Featured Images version: 13.5.7
@Djennez
Copy link
Member

Djennez commented Nov 29, 2021

Confirmed.

It looks like we don't update indexables when code calls WP functions to update metadata. With one exception being our own post meta, which we watch here.

Because the featured image gets updated with a call to set_post_thumbnail(), which results in a update_metadata(), we might want to look into watching post changes via this route as well.

@g-man-jones
Copy link

I am also finding this a problem as we have a custom interface where a user can change their own featured image using 'set_post_thumbnail()' ... I think you should be watching the post changes there as suggested.

Is there any known work around for this issue currently?

@prabhoz
Copy link

prabhoz commented Apr 21, 2023

I am also facing same issue, image is not updating

@hakakou
Copy link

hakakou commented May 2, 2023

Also have this issue. I am trying to update the featured image via the Rest API. After updating, I see correctly the new image in the Wordpress editor (even in the Yoast Section !), however og tags show the old image. I need to manually click the "Update" button in the editor (without actually changing anything) to see updated og tags.

@wiesty
Copy link

wiesty commented Sep 3, 2024

Also have this issue. I am trying to update the featured image via the Rest API. After updating, I see correctly the new image in the Wordpress editor (even in the Yoast Section !), however og tags show the old image. I need to manually click the "Update" button in the editor (without actually changing anything) to see updated og tags.

Same, I am trying to update the og image via a php function, it works in the editor even in the yoast section but it does not update the image. (Not even with the "update" button method)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants