Ajax error clearing notifications/cookies

Get help with installation and running phpBB 3.2.x here. Please do not post bug reports, feature requests, or extension related questions here.
User avatar
nhseacoast
Registered User
Posts: 453
Joined: Sun Sep 22, 2002 10:31 pm
Location: NH, USA
Contact:

Ajax error clearing notifications/cookies

Post by nhseacoast » Wed Sep 13, 2017 12:28 pm

When clearing notifications or the boards cookies..I get the following error:

AJAX error

Something went wrong with the request and the server returned an invalid reply.


Any ideas?
Thank you.

janus_zonstraal
Registered User
Posts: 1732
Joined: Sat Aug 30, 2014 1:30 pm

Re: Ajax error clearing notifications/cookies

Post by janus_zonstraal » Wed Sep 13, 2017 5:58 pm

Take a look at your server error logs and find out if there's anything about it in there. These are usually available in your host's control panel. If not, then ask your host to look for you.
Sorry! My English is bat ;) !!!

User avatar
nhseacoast
Registered User
Posts: 453
Joined: Sun Sep 22, 2002 10:31 pm
Location: NH, USA
Contact:

Re: Ajax error clearing notifications/cookies

Post by nhseacoast » Wed Oct 18, 2017 1:45 pm

There are no error log entries. What could this problem be?

User avatar
nhseacoast
Registered User
Posts: 453
Joined: Sun Sep 22, 2002 10:31 pm
Location: NH, USA
Contact:

Re: Ajax error clearing notifications/cookies

Post by nhseacoast » Thu Oct 19, 2017 12:14 pm

janus_zonstraal wrote:
Wed Sep 13, 2017 5:58 pm
Take a look at your server error logs and find out if there's anything about it in there. These are usually available in your host's control panel. If not, then ask your host to look for you.
I was told by my host that it is a scripting issue. Are there known extensions that could cause this to happen?

User avatar
Mick
Support Team Member
Support Team Member
Posts: 18011
Joined: Fri Aug 29, 2008 9:49 am
Location: Cardiff

Re: Ajax error clearing notifications/cookies

Post by Mick » Thu Oct 19, 2017 1:23 pm

I don’t know about ‘known’ extensions but generally disabling them one at a time until the error goes away will find the culprit if it is an extension issue.
"The more connected we get the more alone we become" - Kyle Broflovski

There are no ‘threads’ in phpBB, they are topics.
Forza Garibaldi

User avatar
nhseacoast
Registered User
Posts: 453
Joined: Sun Sep 22, 2002 10:31 pm
Location: NH, USA
Contact:

Re: Ajax error clearing notifications/cookies

Post by nhseacoast » Fri Oct 20, 2017 11:41 am

Mick wrote:
Thu Oct 19, 2017 1:23 pm
I don’t know about ‘known’ extensions but generally disabling them one at a time until the error goes away will find the culprit if it is an extension issue.
I tried this and the error still exists. Could this be a PHP setting?

User avatar
kasimi
Extension Customisations
Extension Customisations
Posts: 2144
Joined: Sat Sep 10, 2011 7:12 pm
Location: Germany
Contact:

Re: Ajax error clearing notifications/cookies

Post by kasimi » Fri Oct 20, 2017 11:50 am

When debug mode is enabled, more details about the error are printed to the browser console.

How to enable debug mode: open config.php, find // @define('DEBUG', true); and remove the //. If you can't find it, add @define('DEBUG', true); at the bottom of the file. Don't forget to undo these changes afterwards.

User avatar
nhseacoast
Registered User
Posts: 453
Joined: Sun Sep 22, 2002 10:31 pm
Location: NH, USA
Contact:

Re: Ajax error clearing notifications/cookies

Post by nhseacoast » Fri Oct 20, 2017 12:26 pm

Thank you. I made the change, but not sure where to find the error info? I'm using Firefox.

User avatar
nhseacoast
Registered User
Posts: 453
Joined: Sun Sep 22, 2002 10:31 pm
Location: NH, USA
Contact:

Re: Ajax error clearing notifications/cookies

Post by nhseacoast » Fri Oct 20, 2017 12:32 pm

Found it. The debugger. Duh.

Here it is:
AJAX error. status: parsererror, message: SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data

User avatar
kasimi
Extension Customisations
Extension Customisations
Posts: 2144
Joined: Sat Sep 10, 2011 7:12 pm
Location: Germany
Contact:

Re: Ajax error clearing notifications/cookies

Post by kasimi » Fri Oct 20, 2017 1:00 pm

Hit Ctrl+Shift+E (on Mac it's Cmd+Option+E) to open the Network tool, trigger the error and click on the failed request. In the panel on the right, there's a Response tab with the data returned from the server. I suspect you will find the actual error message that the server produces there.

User avatar
nhseacoast
Registered User
Posts: 453
Joined: Sun Sep 22, 2002 10:31 pm
Location: NH, USA
Contact:

Re: Ajax error clearing notifications/cookies

Post by nhseacoast » Fri Oct 20, 2017 1:07 pm

This is what I get.

{"MESSAGE_BODY":"\t<form action=\".\/ucp.php?_=1508504487895&amp;mode=delete_cookies&amp;confirm_key=26OUPYMKHD\" method=\"post\">\n\t\t<h3>Delete all board cookies<\/h3>\n\t\t<p>Are you sure you want to delete all cookies set by this board?<\/p>\n\n\t\t<fieldset class=\"submit-buttons\">\n\t\t\t<input type=\"button\" name=\"confirm\" value=\"Yes\" class=\"button2\" \/>&nbsp;\n\t\t\t<input type=\"button\" name=\"cancel\" value=\"No\" class=\"button2\" \/>\n\t\t<\/fieldset>\n\t<\/form>\n\n","MESSAGE_TITLE":"Delete all board cookies","MESSAGE_TEXT":"Are you sure you want to delete all cookies set by this board?","YES_VALUE":"Yes","S_CONFIRM_ACTION":".\/ucp.php?_=1508504487895&mode=delete_cookies&confirm_key=26OUPYMKHD&confirm_uid=2&sess=9dfbc54827a7926ebb72a10e7b3aabb9&sid=9dfbc54827a7926ebb72a10e7b3aabb9","S_HIDDEN_FIELDS":"<input type=\"hidden\" name=\"confirm_uid\" value=\"2\" \/>\n<input type=\"hidden\" name=\"sess\" value=\"9dfbc54827a7926ebb72a10e7b3aabb9\" \/>\n<input type=\"hidden\" name=\"sid\" value=\"9dfbc54827a7926ebb72a10e7b3aabb9\" \/>\n"}

Also, I don't get prompted for a Yes or No.

User avatar
nhseacoast
Registered User
Posts: 453
Joined: Sun Sep 22, 2002 10:31 pm
Location: NH, USA
Contact:

Re: Ajax error clearing notifications/cookies

Post by nhseacoast » Fri Oct 20, 2017 1:23 pm

BTW...I get the same pop-up error when clearing notifications.

User avatar
kasimi
Extension Customisations
Extension Customisations
Posts: 2144
Joined: Sat Sep 10, 2011 7:12 pm
Location: Germany
Contact:

Re: Ajax error clearing notifications/cookies

Post by kasimi » Fri Oct 20, 2017 1:30 pm

That's valid JSON. The only thing I can think of now is that there's an invisible BOM that the JSON parser doesn't like. Go back to the Response tab and make sure there's no space character before the very first {. If there is, you have probably edited a file with a text editor that added a BOM.

User avatar
nhseacoast
Registered User
Posts: 453
Joined: Sun Sep 22, 2002 10:31 pm
Location: NH, USA
Contact:

Re: Ajax error clearing notifications/cookies

Post by nhseacoast » Fri Oct 20, 2017 1:40 pm

I have this. Could the red dot indicate where the error is? Whitespace perhaps??
Capture.PNG
Capture.PNG (9.9 KiB) Viewed 131 times

User avatar
kasimi
Extension Customisations
Extension Customisations
Posts: 2144
Joined: Sat Sep 10, 2011 7:12 pm
Location: Germany
Contact:

Re: Ajax error clearing notifications/cookies

Post by kasimi » Fri Oct 20, 2017 1:45 pm

Yes, that's most likely a BOM. Did you make manual changes to any files?

Post Reply

Return to “[3.2.x] Support Forum”

Who is online

Users browsing this forum: No registered users and 7 guests

cron