View Issue Details

This bug affects 2 person(s).
IDProjectCategoryView StatusLast Update
18167Bug reportsImport/Exportpublic2022-11-03 14:20
Reporterfranz007 Assigned Togabrieljenik  
Status assignedResolutionopen 
Product Version3.28.x 
Summary18167: Certain answers are neither displayed nor exported

For some, not all, responses, certain answers are not displayed in the "View response details" function.
The same answers are not exported either.
Values are correctly stored in the database.

TagsNo tags attached.
Bug heat24
Complete LimeSurvey version number (& build)Version 3.28.13+220531
I will donate to the project if issue is resolvedNo
Database type & versionMySQL 5.5.55
Server OS (if known)
Webserver software & version (if known)
PHP Version5.6.30

Users monitoring this issue

User List franz007




2022-05-31 17:38

developer   ~70129

No lss or lsa ?
No way to reproduce …



2022-05-31 17:51

reporter   ~70130

lss attached
The problem is for example for questions 2703 and 2740



2022-06-14 16:11

reporter   ~70350

Any update about this?



2022-06-14 23:02

manager   ~70363

From what we have been reviewing the behaviour is happening, but it is to highlight that we believe it may only be happening to questions which are not relevant for the given response (which were not shown during the survey taking process).

Can you confirm this only happens to non-relevant questions?
What kind of export are you using? Individual export or mass response export?



2022-06-15 09:22

reporter   ~70369

Unfortunately this is not the case.
Some of the answers not included in any report are of mandatory questions.
The problem affects both the Responses -> Survey responses -> View response details function and the export in any format.
I attach the example from one of the submitted answers that are affected by the problem.
The answers stored in the database are shown in the image.
Thanks for the support.



2022-06-15 15:47

manager   ~70383

Please, can you include an LSA and point us to a specific response where this is happening?



2022-06-15 16:13

reporter   ~70385

lsa attached.
I had to import the survey into our testing environment to anonymize tokens so sid and other ids have changed.
Responses affected by the problem are for example 37, 41, 42 but there are many ore.
Not all the answers are "missing" the same values.
Data is correctly stored in the database.



2022-06-21 21:21

manager   ~70464

Ohh I understand now!
For specific questions, the response is on the DB, but is showing empty on the individual response view, right?

I thought the row for the whole question was not shown (which could happen if question was not asked).

The response is shown on the queXML export.

image.png (24,587 bytes)   
image.png (24,587 bytes)   


2022-06-22 08:47

reporter   ~70472

Sorry for not being able to fully explain the problem.
The problem is both in viewing a single response and in the export of the responses in all formats.
I have to provide the export of all responses in csv or Excel format.
Could you please further investigate the problem?



2022-06-22 22:19

manager   ~70495

Last edited: 2022-06-22 22:23

I think the is because of the "<" sign used on the answer option.
Can Iask you to remove it and try again? (Just a sa temporary workaround)
Or use "<" as a replacement for "<" (please, try it on a test env)



2022-06-24 08:52

reporter   ~70519

Thanks very much for the hint.
Changing the answers options, display and export of responses is now working.



2022-06-24 17:35

manager   ~70520

Glad workaround works.
Still an issue!



2022-07-06 19:02

manager   ~70771

This is a tough one.

The problem is the use of strip_tags.
Responses like "<1 portion/sett" are returned empty, because strip_tags leaves them empty.
That is being used widely.

The question then is: what kind of data is expected on that field? Html? NonHtml?
If we are expecting Html data there, then the "<" should be encoded, which is not.

Then, we can say "great, let's encode it" or have the html editor to encode it
Then the "<" sign, wouldn't be caught by the strip_tags. as it wouldn't be part of a tag.

The issue is that field, the answer options one, is plain text.
People usually don't enter html there.
Most people wouldn't know.

Then we should think about adding an HTML editor.
But there is not enough space!
We can't add a single line html editor!

The we can say, "ok, lets just encode whatever they type in the plain input text".
But if we do that, how would people enter HTML?

OK, maybe we can allow html only by using the popup editor.
But then, people who is not aware of that and already has html in their answeroptions may get their answer options twisted if they just hit save.

So, what we should do?
Hope that what I expose makes sense



2022-07-06 19:03

manager   ~70772

@c_schmitz @DenisChenu



2022-07-06 19:07

developer   ~70773

Last edited: 2022-07-06 19:08

You can add < only without XSS activated only. With XSS activated : reencoded as & gt ;

I already ask for a feature to force XSS for superadmin (by options) ? Or maybe a "validate and fix HTML but allow script …"
And sometimes :

We have same issue (but with XSS too) with <img src="myimage.png" alt="myimage"> …

I really think we don't have a clean solution working always …

Else : please no HTML editor …

Maybe : export code if final value is empty ?



2022-07-06 19:53

administrator   ~70778

I still don't understand the problem. Cannot reproduce because the example survey were deleted.



2022-07-14 10:05

updater   ~70927

@c_schmitz, please check testing instructions at



2022-07-20 08:58

developer   ~71038

It's not exactly duplicate .

14743: is for USER anwser (must be encoded)
This is for Single select HTML part : encode when export ?



2022-07-20 14:54

manager   ~71053

From #14743, it says talking about answer options.

At our survey we are asking for age and there is an answer option "< 1".


14743: is for USER anwser (must be encoded)

Looks the same to me. Or at leaset very similar.



2022-07-20 14:57

developer   ~71055

Last edited: 2022-07-22 10:59

1 (free text) User answer : use see and entre <strong>strong</strong>
2 (single choice) User click on strong

1 Data is <strong>strong</strong>
2 Data is A1 , answer text is <strong>strong</strong>

It's clearly NOT the same issue. You can not fix both on same way.

Free text must be encoded in all case : the user ENTER this
Answer text must be filtered



2022-09-27 19:21

manager   ~71983

This can be picked up after 18307 and see how exports are working.



2022-11-03 14:20

manager   ~72529

This issue is still happening. To be picked up.

Issue History

Date Modified Username Field Change
2022-05-31 17:37 franz007 New Issue
2022-05-31 17:37 franz007 Issue Monitored: franz007
2022-05-31 17:37 franz007 Bug heat 0 => 2
2022-05-31 17:38 DenisChenu Note Added: 70129
2022-05-31 17:38 DenisChenu Bug heat 2 => 4
2022-05-31 17:51 franz007 Note Added: 70130
2022-05-31 17:51 franz007 File Added: limesurvey_survey_548912.lss
2022-05-31 17:51 franz007 Bug heat 4 => 6
2022-06-14 16:11 franz007 Note Added: 70350
2022-06-14 23:01 gabrieljenik Status new => acknowledged
2022-06-14 23:02 gabrieljenik Assigned To => gabrieljenik
2022-06-14 23:02 gabrieljenik Status acknowledged => feedback
2022-06-14 23:02 gabrieljenik Note Added: 70363
2022-06-14 23:02 gabrieljenik Bug heat 6 => 8
2022-06-15 09:22 franz007 Note Added: 70369
2022-06-15 09:22 franz007 File Added: results-survey548912.csv
2022-06-15 09:22 franz007 File Added: responseDetails.png
2022-06-15 09:22 franz007 Status feedback => assigned
2022-06-15 15:47 gabrieljenik Note Added: 70383
2022-06-15 16:09 franz007 File Deleted: limesurvey_survey_548912.lss
2022-06-15 16:13 franz007 Note Added: 70385
2022-06-15 16:13 franz007 File Added: survey_archive_245644.lsa
2022-06-21 21:21 gabrieljenik Note Added: 70464
2022-06-21 21:21 gabrieljenik File Added: image.png
2022-06-22 08:47 franz007 Note Added: 70472
2022-06-22 22:19 gabrieljenik Note Added: 70495
2022-06-22 22:22 gabrieljenik Note Edited: 70495
2022-06-22 22:23 gabrieljenik Note Edited: 70495
2022-06-24 08:52 franz007 Note Added: 70519
2022-06-24 08:52 franz007 File Deleted: responseDetails.png
2022-06-24 08:52 franz007 File Deleted: results-survey548912.csv
2022-06-24 08:52 franz007 File Deleted: survey_archive_245644.lsa
2022-06-24 17:35 gabrieljenik Note Added: 70520
2022-07-06 19:02 gabrieljenik Note Added: 70771
2022-07-06 19:03 gabrieljenik Note Added: 70772
2022-07-06 19:07 DenisChenu Note Added: 70773
2022-07-06 19:08 DenisChenu Note Edited: 70773
2022-07-06 19:53 c_schmitz Note Added: 70778
2022-07-06 19:53 c_schmitz Bug heat 8 => 10
2022-07-14 00:47 gabrieljenik Bug heat 10 => 16
2022-07-14 10:05 Mazi Bug heat 16 => 22
2022-07-14 10:05 Mazi Note Added: 70927
2022-07-14 10:05 Mazi Bug heat 22 => 24
2022-07-20 08:58 DenisChenu Note Added: 71038
2022-07-20 14:54 gabrieljenik Note Added: 71053
2022-07-20 14:57 DenisChenu Note Added: 71055
2022-07-22 10:59 DenisChenu Note Edited: 71055
2022-07-22 10:59 DenisChenu Note Edited: 71055
2022-09-27 19:21 gabrieljenik Note Added: 71983
2022-11-03 14:20 gabrieljenik Note Added: 72529