I decided to make this change in /usr/share/nginx/html/cake3/rd_cake/src/Model/Behavior/FreeRadiusBehavior.php to work
//Michael 270918
// FIX error on manual add new BYOD. Request has no 'rd_device_owner' value
//$this->_add_radcheck_item($username,'Rd-Device-Owner',$request->data['rd_device_owner']);
$this->_add_radcheck_item($username,'Rd-Device-Owner',$entity->rd_device_owner);
//end Michael
Problem is at $request = Router::getRequest(); dont has 'rd_device_owner' attribute.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
This is on a fresh installation using build 2247. Adding users and vouchers works perfectly.
However adding a BYOD device returns a "Failure Undefined " error
This is what turns up in the error.log
Error: [PDOException] SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'value' cannot be null
This is what the Chrome debugger shows
Form Data:
Response: (too big to copy the entire thing here)
[main] - ROOT/index.php, line 16</pre></div></pre>{ "message": "SQLSTATE[23000]: Integrity constraint violation: 1048 Column \u0027value\u0027 cannot be null", "url": "\/devices\/add.json", "code": 500, "file": "\/usr\/share\/nginx\/html\/cake3\/rd_cake\/vendor\/cakephp\/cakephp\/src\/Database\/Statement\/MysqlStatement.php", "line": 39 }
Has anybody faced this before?
Any help on this would be awesome
Best Regards
Jay
On digging further, found this in the error logs
For some reason Rd-Device-Owner is being set to NULL, although the form data clearly shows the right input.
Can anyone help debugging this...?
Thanks in advance
Found a temporary workaround by editing
/usr/share/nginx/html/cake3/rd_cake/src/Model/Behavior/FreeRadiusBehavior.php
Changed the line
to this
once the entry is created, its possible to change the owner to the correct user.
I decided to make this change in /usr/share/nginx/html/cake3/rd_cake/src/Model/Behavior/FreeRadiusBehavior.php to work
Problem is at $request = Router::getRequest(); dont has 'rd_device_owner' attribute.