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 working with WP REST API V2 #5

Closed
redprogrammer opened this issue Dec 10, 2016 · 6 comments
Closed

not working with WP REST API V2 #5

redprogrammer opened this issue Dec 10, 2016 · 6 comments

Comments

@redprogrammer
Copy link

redprogrammer commented Dec 10, 2016

Plugin not working on WP REST API V2 posts query with parameter _embed.

for example: http://example.com/wp-json/wp/v2/posts?_embed

@airesvsg
Copy link
Owner

airesvsg commented Dec 11, 2016

Hi @redprogrammer,
is DEBUG_MODE enabled?
Thanks

@redprogrammer
Copy link
Author

Hi @airesvsg
DEBUG_MODE is not enabled
Thanks

@airesvsg
Copy link
Owner

airesvsg commented Dec 11, 2016

Hi @redprogrammer,
It's works fine for me.

Steps of my test:
1- I accessed the url: http://example.com/wp-json/wp/v2/posts?_embed
2- I activated the plugin;
3- I accessed the url: http://example.com/wp-json/wp/v2/posts?_embed
4- I edited the title;
5- I accessed the url: http://example.com/wp-json/wp/v2/posts?_embed
6- I accessed the url: http://example.com/wp-json/wp/v2/posts

Thanks

http://example.com/wp-json/wp/v2/posts?_embed

title-1

http://example.com/wp-json/wp/v2/posts

title-2

@redprogrammer
Copy link
Author

redprogrammer commented Dec 11, 2016

can you check the one post child _embeded and wp:featuremedia child??

data[0]._embedded['wp:featuredmedia'][0].source_url normally take me the media url of the data but after install the plugin the content changes?

Can you compare the responses with activating/deactivatng the plugin please??
compare parts should be response sizes, response post _embeded parts

Thanks

@airesvsg
Copy link
Owner

Ok, I'll check.
When the plugin is deactivated, all cache are cleaned.

@redprogrammer
Copy link
Author

redprogrammer commented Dec 11, 2016

@airesvsg

http://example.com/wp-json/wp/v2/posts?_embed

this should be your refference link.

deactivate the plugin and take the response of the query save it, and activate the plugin again take the response of the query. then compare them. In the posts array, there must be a _embeded child in each post, in the _embeded child there must be wp:featuredmedia child. compare them please. When the plugin active there is recursion.

Best Regards

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

No branches or pull requests

2 participants