Join the Webstudio community

Updated 2 months ago

Inconsistent collection behavior (with Wordpress as the CMS)

At a glance
Hey ! Hope you're doing well !

I'm building a basic blog for my website using Wordpress as the CMS (for the blog only). I'm facing a strange issue that is driving me nuts.

On the Blog page (that lists all the posts)(https://www.lokka-immo.com/blog), I have two collections (one for the categories, the other for the posts) and those two collection do not appear consistently. Sometimes they appear with the right data, and sometimes they don't. And the results changes each time I refresh the page...

Same for the Blog Post page (example here : https://www.lokka-immo.com/post/lorem-ipsum-article). Sometimes the data is populated correctly, the other time nothing happens, and it's pretty random and changes everytime I refresh.

I'm using the Graph QL approach described in this video : https://www.youtube.com/watch?v=TkiUInblEPo

The crazy thing is that it works, but not always :/

Any idea what could be wrong ?
T
J
16 comments
On a side note, I'll add that it's working perfectly from the editor :/
Hey I see this error

Some security rule is triggering from your hosting provider and they are blocking the requests from Cloudflare
Hey John ! Thanks for your answer.

No idea how to resolve that, but I'm gonna search into this !

Thank you πŸ™‚
After looking at it more its a 429 error which is too many requests. Your hosting is saying "this ip is asking things from us too often "
I would look into your hosting provider and "rate limits"
Yep, think I found something
The hosting provider I chose seems to apply some "default security rules"
Which are a tad too extreme
All good ! That was it πŸ˜„
thats probs the issue but might be helpful to ensure you only have the resources you need on the page. I've seen some pages with too many resources.. each one makes a request to Wordpress.. 5 resources = 5 requests per page load
Thanks for the tip ! Probably would have take me a looooooot more time to find where to search hahaha
Yup good point. definitely going to check if everything's needed
Add a reply
Sign up and join the conversation on Discord