JSON Data Error
Brought to you by:
jberanek
[Taken from the MRBS-general mailing list]
Hi
Our installation has been running error free for years.
Today on going to the system on doing a simple search we get the error:
“JSON data from server could not be parsed. This is caused by a JSON formatting error” and also cannot regain access to the system for some time.
Restoring from a backup doesn’t help.
Could someone help us in identifying why this error occurs
Which version of MRBS are you running? Has anything in the environment changed recently?
[Taken from the mailing list]
MRBS Version 1.4.11.
I’ll not sure about the environment, nothing I’m aware of. I’ll re-check but we use phpMyAdmin on MySQL.
What might it be?
I don't know. The error message is produced by DataTables, which is the Javascript library that handles the tables, as used in Search. It's saying that the server is sending the browser malformed data. It might be a bug in MRBS, but I don't know why it has suddenly appeared.
I’ve just had a look at the response that is coming back from the server. For some reason the response that’s coming back is the HTML from your home page, rather than the search results table. Have you made any changes to .htaccess recently?
Last edit: Campbell Morrison 2015-02-14
[Taken from the mailing list]
Our ISP reports:
“The issue seems to being caused by ModSecurity. I disabled it for your domain and the mrbs seems to be working now (search included). My guess therefore is that there is something that is upsetting ModSecurity (ie something in the way that mrbs works). I can leave it disabled for your domain, but it will reduce the amount of protection the server offers.”
So problem is in their hands though I’m sure it’s of interest to yourselves & I’ll email again if I hear more after I’ve passed on your query about .htaccess. .
Thank you so much for your response
[Taken from the mailing list]
Hi there,
I had the very same issue; it was happening when an admin user would try to display the users list (over 3000 items). this didn't happen when users were few hundreds.
BUT ....
I accidentally found out that only PCs running WinXP + IE8 were affected; running the same query of a Win7PC with the latest IE (don't remember which version) wouldn't throw the same error.
I have since then ditched WinXP, so, for me, problem solved.
My hosting provider is ARUBA, but as I said, I never had to change anything in their setup, or mine. just the client machine.
Hope this helps,
regards, Stefano
I suspect the case above was due to another problem, such as the JavaScript implementation in IE8 on WinXP running hitting some system limit, eg memory. If so, there are things we could do in MRBS to avoid the problem, such as doing the processing on the server side and then just sending the data that's needed for display down to the browser, instead of sending the complete dataset and letting JavaScript do the processing.
It's a bit more complicated, but probably ought to be done sometime. (And one could even have a hybrid model where the method of sending data to the client was determined by the size of the users table: send it all in one go for optimum performance if a small number, or send it as needed if a large number).
[Taken from the mailing list]
Our ISP further reports:
“Ok. The protection mechanisms used by servers such as ours are evolving all the time and do sometimes conclude that the way applications are used can no longer be considered secure - eg have been found to be vulnerable to attack or the way they operate is similar to techniques used by attackers. Thus even where a site has not changed, the mechanisms might later conclude that they do not like something.
The mechanisms we use on our servers are standard to servers controlled by cpanel. It is thus quite possible/probable that other mbrs sites will also be experiencing the same issues that you have and that this may prompt the mbrs developers to update the core site code at some point in the future.”
Is your ISP able to say what behaviour might have triggered the problem?
See also https://sourceforge.net/p/mrbs/support-requests/691/