Thread Starter
jimaek
(@jimaek)
Never mind, i fixed it 🙂
The working version http://pastebin.com/5rTYCag7
Hey jimaek,
Sorry I didn’t check the forums for a while. Had a quick look at your change, and not sure it’s ideal really. You should really load ajaxize from the same page that your content is loading from. This would allow your ajaxized function to have the same context as the page you’re on. Some functions of course don’t need this, but some certainly do.
I’d be grateful if you can let me know how to reproduce this loop. I could then look at some generic way to avoid it. This could improve ajaxize for other users too. It’s usually down to something not dealing with the ajaxize call correctly, and mistaking it for a request for the actual page, but I wasn’t able to reproduce this so far.
Cheers
Yoav
I’m not sure whether this is the case for you, but I have come across a loop when ajaxize is used together with nginx.
For some reason, nginx and wordpress support permalinks a little differently, which caused the ajaxize parameters to get dropped unless you were on the homepage itself.
The solution in this case was to make sure that your nginx is configured with this directive:
try_files $uri $uri/ /index.php?q=$uri&$args
see here for a little more info
Thread Starter
jimaek
(@jimaek)
Yes im using nginx as you guessed. I think your are correct.
But i will try your fix later as i dont want to play with the production right now.
Thank you 🙂
Thanks jimaek!
It’d be really useful if you could let me know when you get a chance to test it. I am wondering if there’s a reliable way to detect the webserver (and potential mis-configuration) from within the plugin itself so to avoid infinite loops… At the very least I will try to include some comments / update the faq to make sure people are aware of it.
Yoav
Didn’t hear back from OP for some time, so marking as resolved