View Issue Details

This bug affects 1 person(s).
 6
IDProjectCategoryView StatusLast Update
14589Bug reportsExpression Managerpublic2021-02-08 19:13
Reportertammo Assigned To 
PrioritynormalSeveritypartial_block 
Status acknowledgedResolutionopen 
Product Version3.15.x 
Summary14589: Expression in end URL seems to be impossible
Description

I want to use the next expression in the end URL:

https://toolsforresearch.com/report.R?code={if(!is_empty(rd),rd,"demo")}

where rd is a short text question which generates a random code using the following expression:

{join(substr('ABCDEFGHIJKLMNOPQRSTUVWXYZ',rand(0,25),1),substr('ABCDEFGHIJKLMNOPQRSTUVWXYZ',rand(0,25),1),substr('ABCDEFGHIJKLMNOPQRSTUVWXYZ',rand(0,25),1),substr('ABCDEFGHIJKLMNOPQRSTUVWXYZ',rand(0,25),1),substr('ABCDEFGHIJKLMNOPQRSTUVWXYZ',rand(0,25),1),substr('ABCDEFGHIJKLMNOPQRSTUVWXYZ',rand(0,25),1))}-{SAVEDID}

but I end up with the screen as shown in the attachment: the EM code is the end url is not producing the right code.

TagsNo tags attached.
Attached Files
Werkgelukmeter.png (124,805 bytes)
Bug heat6
Complete LimeSurvey version number (& build)Version 3.15.9+190214
I will donate to the project if issue is resolvedNo
BrowserChrome
Database type & versionMySQL
Server OS (if known)Centos
Webserver software & version (if known)Apache
PHP Version7.1.26

Relationships

related to 14113 closedc_schmitz Ampersands are changed to & 

Users monitoring this issue

There are no users monitoring this issue.

Activities

tammo

tammo

2019-03-01 14:06

developer   ~50727

Is there a workaround? Can these quotes be interpreted right in some way?

tammo

tammo

2019-03-01 14:24

developer   ~50728

OK, it does seem to work with single quotes.

DenisChenu

DenisChenu

2019-03-01 14:42

developer   ~50731

Can you check if " is saved as real " or as & quot ; in DB ?

tammo

tammo

2019-03-01 15:06

developer   ~50732

You mean the end url or the question? And where to find the end url in the db?

tammo

tammo

2019-03-01 15:34

developer   ~50733

Found it. Not very easy to find: in lime_surveys_languagesettings

https://toolsforresearch.com/report.R?code={if(!is_empty(rd),rd,"demo")} (no quotes, but &quot for ") (end url)

DenisChenu

DenisChenu

2019-03-01 16:27

developer   ~50735

Ok , then seems it when saving …

cdorin

cdorin

2020-04-01 17:10

reporter   ~56870

Shall I mark it as done?
Before that I can add the example in the manual not to lose it if it s ok for you.

tammo

tammo

2020-04-01 17:18

developer   ~56871

@cdorin: does marking is done mean that it is resolved now or that this is not reproducable or that it is not important enough for paying attention to?

DenisChenu

DenisChenu

2020-04-01 17:39

developer   ~56875

not fixable ?

tammo

tammo

2020-04-01 17:46

developer   ~56877

Never thought that @DenisChenu would say that something that looks so easy at this would not be fixable... Are you sure? I can hardly believe that.

DenisChenu

DenisChenu

2020-04-02 08:26

developer   ~56879

Last edited: 2020-04-02 08:26

  1. We need to url encode simple url ( http:/example.org/&quote="&aquote=' ) (used by a lot of user)
  2. But this broke specific expression (quote inside expression)
  3. There are alternative (using a Equation question type for params or whole url).
  4. This equation question type are more easy to test and fix

Then yes : not fixable ....

Edit
or more : make a lot of spaghetti code for a not so big benefit.

cdorin

cdorin

2020-07-29 21:45

reporter   ~59168

Assigned it to myself to add it into the manual

Issue History

Date Modified Username Field Change
2019-03-01 13:26 tammo New Issue
2019-03-01 13:26 tammo File Added: Werkgelukmeter.png
2019-03-01 14:06 tammo Note Added: 50727
2019-03-01 14:24 tammo Note Added: 50728
2019-03-01 14:40 DenisChenu Relationship added related to 14113
2019-03-01 14:42 DenisChenu Note Added: 50731
2019-03-01 15:06 tammo Note Added: 50732
2019-03-01 15:34 tammo Note Added: 50733
2019-03-01 16:27 DenisChenu Note Added: 50735
2019-11-26 17:45 cdorin Assigned To => cdorin
2019-11-26 17:45 cdorin Status new => assigned
2020-04-01 17:10 cdorin Note Added: 56870
2020-04-01 17:11 cdorin Assigned To cdorin =>
2020-04-01 17:11 cdorin Status assigned => new
2020-04-01 17:11 cdorin Status new => feedback
2020-04-01 17:18 tammo Note Added: 56871
2020-04-01 17:18 tammo Status feedback => new
2020-04-01 17:39 DenisChenu Note Added: 56875
2020-04-01 17:46 tammo Note Added: 56877
2020-04-02 08:26 DenisChenu Note Added: 56879
2020-04-02 08:26 DenisChenu Note Edited: 56879
2020-07-29 21:44 cdorin Assigned To => cdorin
2020-07-29 21:44 cdorin Status new => assigned
2020-07-29 21:45 cdorin Priority none => normal
2020-07-29 21:45 cdorin Description Updated
2020-07-29 21:45 cdorin Note Added: 59168
2021-02-04 10:15 cdorin Status assigned => new
2021-02-08 19:13 cdorin Assigned To cdorin =>
2021-02-08 19:13 cdorin Status new => acknowledged