-
Notifications
You must be signed in to change notification settings - Fork 36
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
Embedded Media is not cached properly #9
Comments
I am having the same issue |
Hi, I can't simulate this error, as I reported it here: Can someone send me the files used with a dump of the database? Thanks |
This may help. I am having the same problem and was able to duplicate it on this site here https://wp-api.webhostingforstudents.com with the following data. It looks like instead of getting the correct embedded content (media or author) it is getting post data instead. |
I'm encountering this issue too. |
I think I'm having the same issue, the non-cached response contains everything we need but the cached version is coming back different. We're relying on the _embed response containing "media_details" which lists all of the images sizes and paths to the images. The non-cached response of one of our requests contains just 2000 lines or so of JSON, whereas the exact same request when cached comes back with 50,000+ lines of JSON which means the cached response actually takes 1.5 seconds longer than the non-cached version, all the nesting looks different and no longer contains "media_details" within the "wp:featuredmedia" block so our images stop working. |
I can verify we are also having the same issue. |
@airesvsg Any update on this? Would a database dump help? |
withcache.txt Exact same issue. This is an absolute blocker for me. Not having featured images is terrible. |
I can confirm,, ?_embed doesn't work, the embed object
gets omitted from the json |
having this issue as well :( |
Ok so here is how i got around it. So far seems to work. and simply ignored the _embed. |
@harrisrobin's response above worked for me. Had the same issue but this was a viable workaround. |
I'll rewrite my plugin in the next month and I'll fix it. Thanks |
I´m currently testing to cache the full outgoing result in the |
Any update on this fix? Still able to replicate the issue. |
@ahrberg Could you show your code? |
There is any solutions to this bug yet? |
I am embedding related
media
in my requests for a custom post type. When I get a cached response, the media array (post._embedded['wp:featuredmedia']
) contains a copy of the array of posts I just received ( minus the_embedded
property on each of the elements ).The text was updated successfully, but these errors were encountered: