-
-
Notifications
You must be signed in to change notification settings - Fork 27
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
Allow creation of comment form via ajax #149
Comments
Hi @krautnerds, Would removing this block simply solve your issue? |
At first glance it looks like these checks are just there to prevent adding too many unnecessary hooks further down. |
Updated reference: Any chance to achieve this without breaking AJAX Comments plugins @websupporter ? |
+1 on this. we store our comments in an ajax-callback with |
@websupporter What about adding a filter (or option?) here to allow AJAX calls if necessary?
I can remove the check and test with some plugins to see if we could add this easily. Or do you think this is solved with v3 already? Which plugins should I check? And this is a tutorial for adding this feature in a theme. Maybe we should check this theme path too: @luflow Did you tried to remove the check? Does this work out? Would a filter be a solution for you? Is this a plugin or a theme solution and is it public or custom? @matthiaswagnerwy Who is "we" in your case? Public plugin we should test? Or something custom made? Have you removed the check to test if this would work for you? Would a filter help you to fix this easier? |
@Zodiac1978 thanks for getting back to this. we made a custom solution based on the tutorial from rudrastyh.com. i tried to remove that mentioned return-statement in antispam-bee temporarily, but it was not enough. i found a few lines which i think should also be considered, but stopped working on that and instead added a simple honeypot for myself since we need to go live soon. a filter would be fine to control this behaviour, if you don't want to add more complexity to your settings interface :) of course, if there would be a setting this should also be based on a filter ;) thanks for your great work! |
Thanks for findings! I can't guarantee anything, but I will try to follow your path. Hopefully we can fix this. |
I tried to get this working with ASB and this tutorial and I have a solution. At first we need to comment out these lines:
My suggestion would be to add a filter here to just disable the return in case of a ajax request. In case of WP in a subfolder the ajax url should be created with a different solution: And now the main part:
This has to be added before the line: So if someone wants to do this, we just have to add a filter to disable the AJAX check. |
Although the above code now allows commenting, Antispam Bee still does not work properly, because we exit our functions because of a request path check: https://github.com/pluginkollektiv/antispam-bee/blob/master/antispam_bee.php#L1134-L1136 and https://github.com/pluginkollektiv/antispam-bee/blob/master/antispam_bee.php#L1179-L1199 The check only allows |
Themes with |
For Ajax call https://github.com/pluginkollektiv/antispam-bee/blob/master/antispam_bee.php#L168 There needs to be added one more check! |
This could be solved with adding this check: If this is an AJAX request, we shouldn't go to the admin branch of the |
Hi everyone!
I just want to understand your decision to block all AJAX calls in the plugin init() function
https://github.com/pluginkollektiv/antispam-bee/blob/master/antispam_bee.php#L76
In our case we just want to create the comment form via AJAX because we are working with a page cache and the comment form will be loaded in a popup after clicking the "Add a comment" Button
Before I work out a pull request to work around this issue I just want to understand the decision to block all AJAX calls.
Thanks :)
The text was updated successfully, but these errors were encountered: