Steps to reproduce
- Add views_exposed_form to the field in /admin/config/user-interface/antibot
- Open a view with pager and exposed filters
- Click on a link in the pager
- You see an error message "Submission failed. Please reload the page, ensure JavaScript is enabled and try again.". I think this is caused by the empty value parameter "antibot_key=" which is added to the pager's links.
This is not the case when ajax is activated for the views.
Is this an issue for views or for this module?!
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | 3200060_error.png | 6.87 KB | hmendes |
| #6 | 3200060-6.patch | 916 bytes | paulocs |
| #5 | antibot_3200060_remove_antibot_key_pagers_link.patch | 926 bytes | arnaud-brugnon |
Comments
Comment #2
tobiberlinComment #3
tobiberlinWhen I enter the page view with query parameters and delete the antibot parameter from the query string everything is working. When I start a search on the view page by submitting the exposed filter form the antibot parameter is added correctly to the resulting url and everything is working.
I wonder if it is really the right way to add the antibot key parameter as a query string to an URL?! Maybe it would be the right way to alter the pager output to avoid that the antibot parameter is added to the links? But then the antibot validation would never work for GET forms.
If it is correct to add the antibot query parameter to the URL the question is why the pager gets an empty value for the antibot input. I think the probem might be that the form gets an empty hidden input for the antibot key and views does not know how to get the real antibot key. I did not find out yet where exactly the ViewExecutable get the values for the exposed input (raw) but as these exposed input values are sent to the pager in ViewExecutable->renderPager() I am quite sure that this is source of the problem.
Comment #4
arnaud-brugnon commentedHello,
I got the same issue.
I can't add ajax support because i have stupid facets on it.
The issue is because antibot_key is not set in pagers link with JS.
I will try to write a patch for it.
Comment #5
arnaud-brugnon commentedI think that pagers link show not be covered by antibot module.
I write a patch in this sense
Comment #6
paulocsPatch #6 makes sense.
I'm adding a new patch that fixes code standards issues.
Comment #7
hmendes commentedI tested the patch from #6 and it worked for me. Changing this to RTBC.
Steps:
Before Patch:

Shows the error
After patch: no error, the pager works
Comment #8
gaurav.kapoor commentedThanks for working on this, I have modified hook views pre-render function doc comment to make it more clear.
Comment #10
gaurav.kapoor commented