- Posts: 3
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
RPC list_surveys returns an empty string after upgrade to v3
- dkbergstrom
- Topic Author
- Offline
- New Member
Less
More
4 years 11 months ago #183437
by dkbergstrom
RPC list_surveys returns an empty string after upgrade to v3 was created by dkbergstrom
Recently I upgraded to Version 3.17.1+190408 from version 2. Everything seems to be working correctly except some of the RPC API calls.
Connection works
List surveys works
Export returns an empty string
I have tried to change the parameters around according to the documentation and each combination returns and empty string. api.limesurvey.org/classes/remotecontrol_handle.html
Connection works
Code:
$rpc = new \org\jsonrpcphp\JsonRPCClient( '***/admin/remotecontrol/' ); $key = $rpc->get_session_key('***', '***');
List surveys works
Code:
$rpc->list_surveys($key, 'reports')
Export returns an empty string
Code:
$rpc->export_responses($key, $surveyID, 'json');
I have tried to change the parameters around according to the documentation and each combination returns and empty string. api.limesurvey.org/classes/remotecontrol_handle.html
The topic has been locked.
- dominikvitt
- Visitor
4 years 11 months ago #183583
by dominikvitt
Replied by dominikvitt on topic RPC list_surveys returns an empty string after upgrade to v3
I tried to reproduce the same issue as you are having, but I get correct response.
You should get some message, not a empty string.
Please check if you get some message when trying with other export types: pdf, csv, xls, doc
You should get some message, not a empty string.
Please check if you get some message when trying with other export types: pdf, csv, xls, doc
The topic has been locked.
- dkbergstrom
- Topic Author
- Offline
- New Member
Less
More
- Posts: 3
- Thank you received: 0
4 years 11 months ago #183631
by dkbergstrom
Replied by dkbergstrom on topic RPC list_surveys returns an empty string after upgrade to v3
// var_dump for csv
string(0) ""
// var_dump for xls
string(0) ""
// var_dump for doc
string(0) ""
// var_dump for json
Fatal error: Uncaught exception 'Exception' with message 'Incorrect response id: (request id: 1)' in ***classes\thirdparty\jsonrpc\JsonRPCClient.php:185 Stack trace: #0 ***survey\index.php(36): org\jsonrpcphp\JsonRPCClient->__call('export_response...', Array) #1 ***survey\index.php(36): org\jsonrpcphp\JsonRPCClient->export_responses('***...', 887129, 'json') #2 {main} thrown in ***classes\thirdparty\jsonrpc\JsonRPCClient.php on line 185
string(0) ""
// var_dump for xls
string(0) ""
// var_dump for doc
string(0) ""
// var_dump for json
Fatal error: Uncaught exception 'Exception' with message 'Incorrect response id: (request id: 1)' in ***classes\thirdparty\jsonrpc\JsonRPCClient.php:185 Stack trace: #0 ***survey\index.php(36): org\jsonrpcphp\JsonRPCClient->__call('export_response...', Array) #1 ***survey\index.php(36): org\jsonrpcphp\JsonRPCClient->export_responses('***...', 887129, 'json') #2 {main} thrown in ***classes\thirdparty\jsonrpc\JsonRPCClient.php on line 185
The topic has been locked.
- dkbergstrom
- Topic Author
- Offline
- New Member
Less
More
- Posts: 3
- Thank you received: 0
4 years 10 months ago #183930
by dkbergstrom
Replied by dkbergstrom on topic RPC list_surveys returns an empty string after upgrade to v3
I resolved the issue by doing a clean install and then migrating the database.
The topic has been locked.
- dominikvitt
- Visitor
4 years 10 months ago #183938
by dominikvitt
Replied by dominikvitt on topic RPC list_surveys returns an empty string after upgrade to v3
Great that you solved this problem!
The topic has been locked.