View Issue Details

This issue affects 1 person(s).
 4
IDProjectCategoryView StatusLast Update
07841Bug reportsRemoteControlpublic2013-05-22 10:50
Reportersveinp Assigned Totrougakoss  
PrioritynormalSeverityminor 
Status closedResolutionnot fixable 
Product Version2.00+ 
Summary07841: list_surveys does not list surveys without startdate and/or expires
Description

SSIA.

Steps To Reproduce

Run list_surveys Remote Control call with active surveys without any values in startdate and expires.

Additional Information

Line 546 in controllers/admin/remotecontrol.php causes the error:
$aData[]= array('sid'=>$oSurvey->primaryKey,'surveyls_title'=>$aSurveyTitle,'startdate'=>$oSurvey->attributes['startdate'],'expires'=>$oSurvey->attributes['expires'],'active'=>$oSurvey->attributes['active']);

I have not been digging into what really fails, just observed that if the array don't contain undefined values everything works fine.

TagsNo tags attached.
Bug heat4
Complete LimeSurvey version number (& build)130514
I will donate to the project if issue is resolvedNo
BrowserNA
Database type & versionpostgres 9.2
Server OS (if known)Ubunto 10.04
Webserver software & version (if known)Apache/2.2.14
PHP Version5.3.2

Users monitoring this issue

There are no users monitoring this issue.

Activities

sveinp

sveinp

2013-05-15 20:42

reporter   ~25271

To be a bit more precise: list_surveys does not list any surveys if any of the surveys miss any of the dates.

trougakoss

trougakoss

2013-05-16 15:38

reporter   ~25276

I just tried it with mysql db and it produced a result like this
array(5) {
["sid"]=>
string(6) "227884"
["surveyls_title"]=>
string(12) "Atitle"
["startdate"]=>
NULL
["expires"]=>
NULL
["active"]=>
string(1) "N"
}

I will try to reproduce the problem with a postgres DB and i will inform you accordingly.

sveinp

sveinp

2013-05-16 15:39

reporter   ~25277

It looks like the same problem goes for all RemoteControl calls, if there is NULL values in the data to be returned, the call itself returns NULL.

Forgot to mention that I am using the XML RPC version, I have not tested the json api.

trougakoss

trougakoss

2013-05-20 14:02

reporter   ~25309

I tried to get a list of surveys using the following configuration
LimeSurvey build number 130514
Database & DB-Version postgres 9.1
Operating System Ubuntu 12.10
Webserver software & version Apache/2.2.22
PHP Version 5.4.6

I tried to get a list of surveys where
one of them was active and had dates
one of them was inactive and had dates
a third one was inactive and without dates
And a fourth was active without dates

I used xmlrpc interface BUT I could not replicate the problem
I get the list without any problems

Maybe there is something wrong with your installation.
Please check again and inform us.

sveinp

sveinp

2013-05-20 20:57

reporter   ~25319

Blush

I really should have investigated more before sending this bug report. I implemented my client in Perl using RPC::XML::Client (RPC::XML was once upon the time a reference implementation for XML RPC). As a reference implementation, it follows the standard strict unless told otherwise.

For undefined values, LimeSurvey sends a <nil/> tag. This is not part of the XML RPC standard, but defined in an extension to the standard. RPC::XML accepts this only if $RPC::XML::ALLOW_NIL is set to a true value.

When I received an undefined value as the response, I should not have assumed that LimeSurvey did not send a response, but investigated the traffic. My apologies for wasting your time!

But, it would be nice with a note in the manual stating that the nil extension is used.

Svein

trougakoss

trougakoss

2013-05-21 09:22

reporter   ~25322

No worries Svein.
Regarding the null values, the rpc acts as the intermediate between the application (and db ) and the user.
We do not intervene to the values that we get from the db so the nulls are expected.
Also i should point out that the rpc is intended to be protocol agnostic, so we do not actually engage with the protocols details (either json or xml).

As for the documentation, I will probably make a note regarding the nulls just to be safe.
Thanks a lot.

Issue History

Date Modified Username Field Change
2013-05-15 20:06 sveinp New Issue
2013-05-15 20:42 sveinp Note Added: 25271
2013-05-16 07:01 c_schmitz Assigned To => trougakoss
2013-05-16 07:01 c_schmitz Status new => assigned
2013-05-16 15:38 trougakoss Note Added: 25276
2013-05-16 15:39 sveinp Note Added: 25277
2013-05-20 14:02 trougakoss Note Added: 25309
2013-05-20 20:57 sveinp Note Added: 25319
2013-05-21 09:22 trougakoss Note Added: 25322
2013-05-22 10:50 trougakoss Status assigned => closed
2013-05-22 10:50 trougakoss Resolution open => not fixable