Using: http://drupal.org/project/facebook_status
My facebook_status page view (ie. individual user status page view) currently gives "An error occurred at views/ajax" when attempting to switch page. The general status page at facebook_status_recent does not give the same error and works perfectly.
I can't figure out why as they use more or less the same settings.
The only other even slightly similar seeming instance I found of this was a permissions bug here:
http://drupal.org/node/408894
I have ensured permissions are set up and tried changing the access option for the problematic view to 'access content' with no help. I have cleared cache and tried different themes.
Furthermore, if I right click the page link and copy/paste it into my address bar it will load the next page perfectly, so I know it is getting the right links. I just can't click them directly.
Why does AJAX give this error? Any ideas or ways I can debug this?
Thanks.
Comments
Comment #1
uomeds commentedI checked the error logs and they seem to be registering as 406 page not found. When I try going to the link they are trying to reach I also get Page Not Found.
So for some reason my Ajax is looking for a wrong address on that view. From the link it's requesting below, any idea why or where I should go from here?
(I added WEBSITE to the link above so it would read properly here)
Thanks again.
edit: It appears 406 is typically a server setup issue usually with Apache mod_security. Checking with my host now.
Comment #2
uomeds commentedJust for the archives in case someone else has this issue, I contacted my host requesting they disable mod_security.
They replied:
"We have got the following error in the error logs.
=====================
[Tue Aug 18 12:43:32 2009] [error] [client 99.225.189.34] ModSecurity: Access denied with code 406 (phase 2). Pattern match "\%(?![0-9a-fA-F]{2}|u[0-9a-fA-F]{4})" at ARGS:view_base_path. [file "/usr/local/apache/conf/modsec2.user.conf"] [line "20"] [id "950107"] [msg "URL Encoding Abuse Attack Attempt"] [severity "WARNING"] [hostname "WEBSITE.com"] [uri "/views/ajax"] [unique_id "SoraNEYh9woAAAjOdz0AAAAH"]
=====================
To fix this we have disabled that mod sec rule for the URI "/views/ajax". Kindly check now."
It now works perfectly.
Comment #3
uomeds commentedfixed
Comment #4
twodI also had this problem on one of my sites, but only in Firefox (IE worked fine for once).
It also happened with the AJAX code from CTools.
A simple fix made it work, insert a space in the data property in all ajaxSubmit calls (views/js/ajax.js). Seems something goes wrong when Firefox tries to POST an empty string.
That host is also running mod_security2, which means it can't be turned off in .htaccess, so you'd have to contact the host like uomeds did.
Comment #6
spangaroo commentedI'll add my issue here as it's exactly the same: "An error occurred at /views/ajax."
I contacted my webhost and they suggested that I put this code in my .htaccess to prevent the 406 error:
Unfortunately, my error log shows that I'm still getting the 406.
I have ajax working with views and panels in another section of the site and there is no problem there.
The 2 sections where the error occurs is "Slideshow" and "Video" on my front page (Flexible Panel). Those views were built using FeedAPI fields.
When I built this locally on my MAMP environment, everything was fine so it might be a problem with my webhost.
If anyone has encountered a similar issue or has any idea how to fix, please let me know. I'll update with info from the webhost if they find a solution.
Comment #7
spangaroo commentedJust to give an update, this was the reply from my webhost.
Everything is up and running so glad that's fixed. As mentioned in this comment, I'm not too concerned about the mod_security setting being turned off but will report back if there are any bizarre twists.
Comment #8
WSRyu commented#6 worked for me, check here: http://drupal.org/node/452384