View Issue Details

This bug affects 1 person(s).
 4
IDProjectCategoryView StatusLast Update
06180Bug reportsSurvey participants (Tokens)public2012-06-20 14:05
Reporteruser20298Assigned Toc_schmitz  
PrioritynormalSeveritycrash 
Status closedResolutionfixed 
Product Version2.00RC2 
Fixed in Version2.00RC3 
Summary06180: URL in token e-mails is relative, not absolute
Description

When sending out e-mails with 2.00RC2, {SURVEYURL} expands to a relative URL, which does not work for users. It looks something like this:

/index.php/survey...

Additionally, the actual URL passed is incorrect, as it does not include the action part (index) and specifies surveyID instead of sid.

This is due to a bug in application/controllers/admin/tokens.php, where "createUrl" is called instead of "createAbsoluteUrl", and additionally the argument to createUrl function is plain wrong.

TagsNo tags attached.
Bug heat4
Complete LimeSurvey version number (& build)120528
I will donate to the project if issue is resolvedNo
BrowserFirefox 12
Database type & versionMysql 5
Server OS (if known)Linux
Webserver software & version (if known)Apache
PHP Version5

Relationships

related to 06131 closedc_schmitz Images for questions upoaded to server but not showed up 

Users monitoring this issue

There are no users monitoring this issue.

Activities

c_schmitz

c_schmitz

2012-06-09 14:53

administrator   ~19135

Last edited: 2012-06-09 14:56

Care to submit a patch/pull request on gitHub?

user20298

2012-06-11 10:12

  ~19150

I am far to inexperienced with Yii to trust my own «hack» here. This is what I did to fix the tokens:

Line 1152, application/controllers/admin/tokens.php

$fieldsarray["{SURVEYURL}"] = $this->getController()->createAbsoluteUrl("/survey/index/sid/{$iSurveyId}/token/{$emrow['token']}");

This URL I found by following the link to complete the survey as a certain participant from the tokens administration screen.

But compared to the old URL I just removed the language part, which I anyway found odd to include in the first place; couldn't we just lookup the language associated with the token on request? Lines 1150 and 1151 must be fixed as well, but I don't use the opt-out and opt-in, and I don't know the correct URLs.

c_schmitz

c_schmitz

2012-06-20 14:05

administrator   ~19373

2.0RC3 released

Issue History

Date Modified Username Field Change
2012-06-07 23:16 user20298 New Issue
2012-06-09 14:53 c_schmitz Note Added: 19135
2012-06-09 14:56 c_schmitz Note Edited: 19135
2012-06-11 10:06 Mazi Assigned To => c_schmitz
2012-06-11 10:06 Mazi Status new => assigned
2012-06-11 10:12 user20298 Note Added: 19150
2012-06-12 14:48 c_schmitz Status assigned => resolved
2012-06-12 14:48 c_schmitz Fixed in Version => 2.00RC3
2012-06-12 14:48 c_schmitz Resolution open => fixed
2012-06-12 14:49 c_schmitz Relationship added related to 06131
2012-06-20 14:05 c_schmitz Note Added: 19373
2012-06-20 14:05 c_schmitz Status resolved => closed
2016-12-08 10:39 c_schmitz Category Tokens => Survey participants (Tokens)