This Help forum is for issues relates to the latest release (1.7.2). For issues related to beta or github version please use their own Help forum.
Before asking for help please read "How to request help" by clicking on that tab above here."

TOPIC: Datatables Warning on User Administration screen

Datatables Warning on User Administration screen 2 years 7 months ago #1

  • ajduke
  • ajduke's Avatar
  • Offline
  • New
  • Posts: 19
Hello all,

I've got a newly installed v1.7.3 which gives the following error when going to the User Administration screen (admin_users.php):

DataTables warning: table id=DataTables_Table_0 - Invalid JSON response. For more information about this error, please see datatables.net/tn/1

I can successfully do other user actions such as adding and editing, it is just this one place I get an error.

Install is freshly done by Softaculous on a host using PHP 5.6 and MySQL 10.0.23-MariaDB, libmysql - 5.1.73

Any ideas how to fix this? Thanks.
The administrator has disabled public write access.

Datatables Warning on User Administration screen 2 years 7 months ago #2

  • fisharebest
  • fisharebest's Avatar
  • Offline
  • Administrator
  • Posts: 10395
To diagnose the problem, can you:

1) install the FireBug plugin for Firefox.
2) activate FireBug (F12 or click the new toolbar icon).
3) select the "Net" or "Network" tab.
4) select the XHR filter
5) visit the admin_users.php page, and allow the error to occur.
6) the XHR request will appear in the list.
7) expand it, and look at the Respons/Json/Html tab.
8) you should now see a helpful error message! Tell us what it says, and we'll be able to tell you exactly what is wrong.

(PS - if you don't use Firefox, then Chrome has similar functions built-in - "Developer tools")
Greg Roach - This email address is being protected from spambots. You need JavaScript enabled to view it. - fisharebest.webtrees.net
The administrator has disabled public write access.

Datatables Warning on User Administration screen 2 years 7 months ago #3

  • ajduke
  • ajduke's Avatar
  • Offline
  • New
  • Posts: 19
Thanks for the guidance, the error is:
#0 /admin_users.php:144 ErrorException("Undefined index: value")<br>
The administrator has disabled public write access.

Datatables Warning on User Administration screen 2 years 7 months ago #4

  • fisharebest
  • fisharebest's Avatar
  • Offline
  • Administrator
  • Posts: 10395
At step (7), there is a "Post" tab. This shows all the parameters that were sent with the request.

On mine, it ends with

order[0][dir] asc
search[regex] false
search[value]
start 0

Your error suggests that you are missing search[value]

Now, to investigate this, I would look for something "unsual" in the request details. Of course, it is hard to define "unusual", and difficult for me to ask precise questions that might define "unusual". With that said, look at the request details, and see if anything stands out....
Greg Roach - This email address is being protected from spambots. You need JavaScript enabled to view it. - fisharebest.webtrees.net
The administrator has disabled public write access.

Datatables Warning on User Administration screen 2 years 7 months ago #5

  • ajduke
  • ajduke's Avatar
  • Offline
  • New
  • Posts: 19
The post looks quite normal I think, the search[value] is present but empty the same as yours was. Interestingly, if I type into the filter box then it successfully pulls back user records using the search term I entered with no errors, but when I delete the text in the Filter box again it gives the same error.

columns[9][data] 9
columns[9][name]
columns[9][orderable] true
columns[9][search][regex] false
columns[9][search][value]
columns[9][searchable] true
draw 1
length 10
order[0][column] 2
order[0][dir] asc
search[regex] false
search[value]
start 0
The administrator has disabled public write access.

Datatables Warning on User Administration screen 2 years 7 months ago #6

  • fisharebest
  • fisharebest's Avatar
  • Offline
  • Administrator
  • Posts: 10395
> search[value]

This shows that the value was submitted to the server.

> #0 /admin_users.php:144 ErrorException("Undefined index: value")<br>

This indicates that the value was not received by the server.

You might like to examine the values that the server received. Was just this one missing, or are others missing?

You could add the line

var_dump($_POST) just before the line that gives the error. You would then view the output in Firebug, as before.
Greg Roach - This email address is being protected from spambots. You need JavaScript enabled to view it. - fisharebest.webtrees.net
The administrator has disabled public write access.

Datatables Warning on User Administration screen 2 years 7 months ago #7

  • ajduke
  • ajduke's Avatar
  • Offline
  • New
  • Posts: 19
This is part of what I get in the Response:

[11]=>
array(4) {
["data"]=>
string(2) "11"
["searchable"]=>
string(4) "true"
["orderable"]=>
string(4) "true"
["search"]=>
array(1) {
["regex"]=>
string(5) "false"
}
}
}
["order"]=>
array(1) {
[0]=>
array(2) {
["column"]=>
string(1) "2"
["dir"]=>
string(3) "asc"
}
}
["start"]=>
string(1) "0"
["length"]=>
string(2) "10"
["search"]=>
array(1) {
["regex"]=>
string(5) "false"
}
}
#0 /admin_users.php:145 ErrorException("Undefined index: value")<br>}
}
[4]=>
array(4) {
["data"]=>
string(1) "4"
["searchable"]=>
string(4) "true"
["orderable"]=>
string(4) "true"
["search"]=>
array(1) {
["regex"]=>
string(5) "false"
}
}
The administrator has disabled public write access.

Datatables Warning on User Administration screen 2 years 7 months ago #8

  • ajduke
  • ajduke's Avatar
  • Offline
  • New
  • Posts: 19
When I type a space into the Filter box then it successfully pulls back all the user records as is expected to happen when the filter box is empty.

So does the code for the filter box need to be updated to pass a space character or empty string back when it is blank rather than nothing at all?

The Search "value" is missing on the server side.
The administrator has disabled public write access.
Do you need a web hosting solution for your webtrees site?
If you prefer a host that specialises in webtrees, the following page lists some suppliers able to provide one for you: 

Datatables Warning on User Administration screen 2 years 7 months ago #9

  • fisharebest
  • fisharebest's Avatar
  • Offline
  • Administrator
  • Posts: 10395
So, we've seen that the browser sends "search[value]" to the server, but that it is not present in PHP ($_POST).

Odd.

What value do you have for "max_input_vars" in your PHP configuration (Control panel -> Website -> Server information)?
Greg Roach - This email address is being protected from spambots. You need JavaScript enabled to view it. - fisharebest.webtrees.net
The administrator has disabled public write access.

Datatables Warning on User Administration screen 2 years 7 months ago #10

  • fisharebest
  • fisharebest's Avatar
  • Offline
  • Administrator
  • Posts: 10395
Also, in the server information, do you have an entry for suhosin.post.max_vars
Greg Roach - This email address is being protected from spambots. You need JavaScript enabled to view it. - fisharebest.webtrees.net
The administrator has disabled public write access.

Datatables Warning on User Administration screen 2 years 7 months ago #11

  • ajduke
  • ajduke's Avatar
  • Offline
  • New
  • Posts: 19
Both those variables are set to 1000.
The administrator has disabled public write access.

Datatables Warning on User Administration screen 2 years 7 months ago #12

  • fisharebest
  • fisharebest's Avatar
  • Offline
  • Administrator
  • Posts: 10395
> Both

Implies you have the Suhosin security module.

This is a module that the modifies/filters/blocks "suspicious" input data. It is possible that one of its configuration options is causing the problem.

I've never used Suhosin, so some googling would be necessary. Maybe post all the Suhosin settings here?
Greg Roach - This email address is being protected from spambots. You need JavaScript enabled to view it. - fisharebest.webtrees.net
The administrator has disabled public write access.

Datatables Warning on User Administration screen 2 years 7 months ago #13

  • ajduke
  • ajduke's Avatar
  • Offline
  • New
  • Posts: 19
I've attached all the parameters which appear in the Server Info screen

This message has an attachment file.
Please log in or register to see it.

The administrator has disabled public write access.

Datatables Warning on User Administration screen 2 years 7 months ago #14

  • fisharebest
  • fisharebest's Avatar
  • Offline
  • Administrator
  • Posts: 10395
What version of PHP
Greg Roach - This email address is being protected from spambots. You need JavaScript enabled to view it. - fisharebest.webtrees.net
The administrator has disabled public write access.

Datatables Warning on User Administration screen 2 years 7 months ago #15

  • ajduke
  • ajduke's Avatar
  • Offline
  • New
  • Posts: 19
PHP Version 5.6.17
The administrator has disabled public write access.

Datatables Warning on User Administration screen 2 years 5 months ago #16

  • Bronco
  • Bronco's Avatar
Okay I have the same problem, I am using Chrome and I opened the developer tools and ran it. Upon inspection of the side bar, I noticed a yellow Exclamation mark saying unknown property name in the Bootstrap.min.css:5 code

html {
font-family: sans-serif;
-webkit-text-size-adjust: 100%; <---This is where it says that the unknown property name is.
-ms-text-size-adjust: 100%;
The administrator has disabled public write access.

Datatables Warning on User Administration screen 2 years 5 months ago #17

  • Bronco
  • Bronco's Avatar
It fixed itself, uncertain how or what it did but I no longer have any issues.
The administrator has disabled public write access.
Powered by Kunena Forum