RPC list_surveys returns an empty string after upgrade to v3

More
1 month 3 days ago #183437 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
$rpc 		= new \org\jsonrpcphp\JsonRPCClient( '***/admin/remotecontrol/' );
$key 		= $rpc->get_session_key('***', '***');

List surveys works
$rpc->list_surveys($key, 'reports')

Export returns an empty string
$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

Please Log in or Create an account to join the conversation.

LimeSurvey Partners
More
4 weeks 2 hours ago #183583 by dominikvitt
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

Please Log in or Create an account to join the conversation.

More
3 weeks 6 days ago #183631 by dkbergstrom
// 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

Please Log in or Create an account to join the conversation.

More
3 weeks 15 hours ago #183930 by dkbergstrom
I resolved the issue by doing a clean install and then migrating the database.

Please Log in or Create an account to join the conversation.

More
3 weeks 5 hours ago #183938 by dominikvitt
Great that you solved this problem!

Please Log in or Create an account to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now
Join our Newsletter!