Now I seem to get this error every time I update a post. I just added a ACF field to the post type and I'm going through each post and putting stuff in the fields. For each post that I update, the featured image disappears from the grid. Like before, I have to either double click the post caption in the grid and just click "OK" in order for the image to show, or add the post thumbnail again as a new instance.
The JSON output is to big to put here, but I did some comparison of the the outputs, before and after the update of a specific post, and found that when I update the post, it's replacing the cont
property with the attachment ID, instead of the image URL that was there before. This is the only difference I found when comparing the two JSON outputs.
This is how it looked before I updated the post (on that specific post in the JSON data):
"cont": "/wp-content/uploads/2019/03/2301180918_image5.jpg"
And this is how it looks after updating:
"cont": "34"
This leads to a value of null
in the JSON on ar
and sizes
, which explains why the featured image isn't showing. So there must be something in the code that puts an ID of the attachment instead of the URL. I'm not sure why I didn't experience this when recently updating the featured image itself though. Right now it seems to affect the featured image data when I update anything else (i. e. the title and the ACF fields, maybe any field).