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

Working test configuration but not event #4

Closed
gibix opened this issue Nov 4, 2022 · 4 comments
Closed

Working test configuration but not event #4

gibix opened this issue Nov 4, 2022 · 4 comments

Comments

@gibix
Copy link

gibix commented Nov 4, 2022

Hello. Thank you for your work.

Plugin version: 1.0.8
Wp version: 6.1

I correctly installed and configured the plugin to send the request on my public api, if I test the configuration I can correctly see the request sent to nextjs and the cache updated for the latest post and the homepage.

Editing any article do not trigger the re-validation request. I'm not comfortable to debug php/wp, could you provide me some instruction for extract other debug info?

@bebjakub
Copy link
Contributor

bebjakub commented Nov 5, 2022

Hi @gibix,
I just checked a production website, wp correctly triggers the revalidation request on post update.
The problem could be with the GraphQL cache, check this discussion, pls wpengine/faustjs#842

To be sure that wp triggers revalidation on the post update, edit your revalidation endpoint script to enable logs, like in this snippet https://github.com/gdidentity/on-demand-revalidation/blob/main/README.md

@gibix
Copy link
Author

gibix commented Nov 5, 2022

Hello, thank you for your reply.

I investigated a little more and I still think that the problem is on the wp side. I just checked with tcpdump the traffic from wp to nextjs and I can see the put request coming with the correct json paths body when I manually press revalidate latest post. Unfortunatly I cannot detect any traffic when I edit a post.

More debug info: I tried also to deactivate any other wp plugin in order to exclude any possible conflict with others.

@bebjakub
Copy link
Contributor

bebjakub commented Nov 5, 2022

Maybe you have a problem with wp_cron.
On post update, the plugin schedules the revalidation request (to prevent longer post updating due to waiting on revalidation response): https://github.com/gdidentity/on-demand-revalidation/blob/f2b72509050fd8e0a07d6c2c6278a0e3703cf586/src/Revalidation.php#L17
Please try after the post update make one more request in the wp, visit posts lists, etc.
If the problem persists, please check your cron log with https://wordpress.org/plugins/wp-crontrol/

@gibix
Copy link
Author

gibix commented Nov 5, 2022

Thanks was a problem related to wp_cron, Thank you again for the help in debugging!

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