View Issue Details

This bug affects 1 person(s).
 6
IDProjectCategoryView StatusLast Update
08833Bug reportsRemoteControlpublic2014-03-20 14:52
ReporterLaurentS Assigned Toc_schmitz  
PrioritynormalSeverityminor 
Status closedResolutionfixed 
Product Version2.05+ 
Fixed in Version2.05+ 
Summary08833: RC activate_tokens throws error but action is done, with imported servey
Description

Hi there,
I recently installed update 2.05+ Build 140302 and when doing this serie of actions by remote control :

  • import_survey
  • set_survey_properties (to set admin name & email)
  • activate_survey
  • activate_tokens
    this last one throws this error : Token table could not be created
    but the token table is actually created.

I join the survey template that I import.
Please note that when activating tokens, I also create additional attribute fields 1 & 2, using the aAttributeFields parameter.

I tried doing the first 3 steps "manually" from LimeSurvey admin pages, then just activating tokens with RC : same result.
On the other hand, creating a new survey (ie not importing), activating it, then RC to activate tokens works fine ("result" = OK)

TagsNo tags attached.
Attached Files
Bug heat6
Complete LimeSurvey version number (& build)140302
I will donate to the project if issue is resolvedNo
Browser
Database type & versionMySQL 5.1
Server OS (if known)Linux
Webserver software & version (if known)Apache (hosted, don't know version)
PHP Version5.3.16

Users monitoring this issue

LaurentS

Activities

LaurentS

LaurentS

2014-03-10 12:50

reporter   ~29160

Last edited: 2014-03-10 12:51

The attached file ending with "26513" is not the one I wanted to upload.

The correct one is ending with "TMP", but I can't find how to delete the first one.

Thanks to any staff member for deleting the first one.

c_schmitz

c_schmitz

2014-03-18 15:58

administrator   ~29347

Can you provide the code example you are using to do the mentioned steps?

LaurentS

LaurentS

2014-03-18 18:22

reporter   ~29357

I use a few php scripts on our hosted website, which I call from our backoffice application.
I've joined the ones required for these tests in a zip file.
RC results are parsed and stored in our app.

Limesurvey is installed in wwwroot/survey/
The php scripts are in wwwroot/applications/ (and so is the jsonRPCClient.php file)
The test lss file is to be put in subfolder wwwroot/applications/survey/

Currently I can only send GET requests from our backoffice (will soon be upgraded to send POST), so the password for the account 'survey_admin' used everywhere is stored in the config.php file.
So if you want to test with the files as is, you'll have to create an account 'survey_admin' with password 'adminpassword'
But you could use any other account and send a '&pass=' parameter in the URL

Note that you'll also have to set $LS_BASEURL to your test URL in this file.

Sample requests would be :

http://mydomain/applications/import_survey.php?user=survey_admin&file=modele_quest_final_TMP.lss&name=TEST%20SURVEY

returning SURVEYID

http://mydomain/applications/set_survey_properties.php?user=survey_admin&id=SURVEYID&prop=admin;adminemail&val=Admin%20NAME;admin@mydomain.com

http://mydomain/applications/activate_survey.php?user=survey_admin&id=SURVEYID

http://mydomain/applications/activate_tokens.php?user=survey_admin&id=SURVEYID&attr=1;2

c_schmitz

c_schmitz

2014-03-19 17:10

administrator   ~29419

Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=14046

c_schmitz

c_schmitz

2014-03-19 17:11

administrator   ~29420

The problem was that the imported survey already had attribute fields defined. If existing they will be used for attribute creation which collided with the ones you set in your RC call. Now your fields are created first, then the ones in the attribute definitions.

c_schmitz

c_schmitz

2014-03-20 14:52

administrator   ~29448

2.05+ Build 140320 released

Related Changesets

LimeSurvey: master 29ac2a12

2014-03-19 17:10

c_schmitz


Details Diff
Fixed issue 08833: RemoteControl activate_tokens throws error but action is done using imported survey Affected Issues
08833
mod - application/helpers/admin/token_helper.php Diff File

Issue History

Date Modified Username Field Change
2014-03-10 12:23 LaurentS New Issue
2014-03-10 12:23 LaurentS File Added: modele_quest_final_26513.lss
2014-03-10 12:45 LaurentS Issue Monitored: LaurentS
2014-03-10 12:46 LaurentS File Added: modele_quest_final_TMP.lss
2014-03-10 12:50 LaurentS Note Added: 29160
2014-03-10 12:51 LaurentS Note Edited: 29160
2014-03-18 15:57 c_schmitz File Deleted: modele_quest_final_26513.lss
2014-03-18 15:58 c_schmitz Note Added: 29347
2014-03-18 15:58 c_schmitz Assigned To => c_schmitz
2014-03-18 15:58 c_schmitz Status new => feedback
2014-03-18 18:22 LaurentS Note Added: 29357
2014-03-18 18:22 LaurentS Status feedback => assigned
2014-03-18 18:23 LaurentS File Added: LaurentS_TEST_RC.zip
2014-03-19 17:10 c_schmitz Changeset attached => LimeSurvey master 29ac2a12
2014-03-19 17:10 c_schmitz Note Added: 29419
2014-03-19 17:10 c_schmitz Resolution open => fixed
2014-03-19 17:11 c_schmitz Note Added: 29420
2014-03-19 17:12 c_schmitz Status assigned => resolved
2014-03-19 17:12 c_schmitz Fixed in Version => 2.05+
2014-03-19 17:12 c_schmitz File Deleted: LaurentS_TEST_RC.zip
2014-03-20 14:52 c_schmitz Note Added: 29448
2014-03-20 14:52 c_schmitz Status resolved => closed
2021-08-03 18:57 guest Bug heat 4 => 6