View Issue Details

This bug affects 1 person(s).
 8
IDProjectCategoryView StatusLast Update
19661Bug reportsImport/Exportpublic2024-11-25 17:53
Reportermguzzinati Assigned Totibor.pacalat  
PrioritynoneSeveritypartial_block 
Status ready for testingResolutionopen 
Product Version6.5.x 
Summary19661: Data inconsistency in responses after importing LSA files
Description

After creating a questionnaire and a response which includes special characters including " ' ", " ] ", etc., I export the questionnaire with the LSA format, the %_responses.lsr file is correct, but when I import it of the .lsa file, the text of the questions in the new imported questionnaire is correct but the answers present some anomalies, all the " ' " disappear.

Steps To Reproduce

Steps to reproduce

-Create a questionnaire.
-Answer a question by entering characters like " ' ".
-Export the questionnaire in .lsa format
-Import the previously exported questionnaire (in the same environment by first deleting the previously exported one or in a new environment - tested with v6.5 and v5.6)
-read the answers you just posted

Expected result

see the answer correctly

(Write here what you expected to happen)

Actual result

all " ' " will disappear.

TagsNo tags attached.
Attached Files
Bug heat8
Complete LimeSurvey version number (& build)LimeSurvey Community Edition Version 6.5.4+240422
I will donate to the project if issue is resolvedNo
Browser
Database type & versionpostgres
Server OS (if known)
Webserver software & version (if known)
PHP Version8.2.7

Users monitoring this issue

There are no users monitoring this issue.

Activities

DenisChenu

DenisChenu

2024-07-22 11:53

developer   ~80680

Do you have the same thing with VV export/import ?

mguzzinati

mguzzinati

2024-07-22 12:08

reporter   ~80681

I hadn't tried it yet, I don't have this error with VV export/import. I still get it just by importing the entire questionnaire with the answers with the .lsa file

mguzzinati

mguzzinati

2024-11-13 10:37

reporter   ~81374

news?

tibor.pacalat

tibor.pacalat

2024-11-13 17:56

administrator   ~81378

@gabrieljenik I exported and imported the survey and then looked at the answers. They are indeed missing single quote. Is this maybe because we are sanitizing those strings somehow?

gabrieljenik

gabrieljenik

2024-11-20 16:06

manager   ~81470

I will review and be back.

gabrieljenik

gabrieljenik

2024-11-25 14:49

manager   ~81502

https://github.com/LimeSurvey/LimeSurvey/pull/4056

SurveyDynamic's insertRecords method was being used, which effectively has a sanitization, but it's not clear to me why...

Didn't dare to take it out.
Opted for something more similar to importing responses in CSV.

tibor.pacalat

tibor.pacalat

2024-11-25 17:53

administrator   ~81504

@gabrieljenik some tests are failing on your branch, can you please take a look at that?

Issue History

Date Modified Username Field Change
2024-07-22 11:47 mguzzinati New Issue
2024-07-22 11:47 mguzzinati File Added: survey_archive_182564.lsa
2024-07-22 11:53 DenisChenu Note Added: 80680
2024-07-22 11:53 DenisChenu Bug heat 0 => 2
2024-07-22 12:08 mguzzinati Note Added: 80681
2024-07-22 12:08 mguzzinati Bug heat 2 => 4
2024-11-13 10:37 mguzzinati Note Added: 81374
2024-11-13 17:54 tibor.pacalat Assigned To => gabrieljenik
2024-11-13 17:54 tibor.pacalat Status new => assigned
2024-11-13 17:56 tibor.pacalat Note Added: 81378
2024-11-13 17:56 tibor.pacalat File Added: Screenshot 2024-11-13 at 17.54.26.png
2024-11-13 17:56 tibor.pacalat Bug heat 4 => 6
2024-11-20 16:06 gabrieljenik Note Added: 81470
2024-11-20 16:06 gabrieljenik Bug heat 6 => 8
2024-11-25 14:49 gabrieljenik Assigned To gabrieljenik => DenisChenu
2024-11-25 14:49 gabrieljenik Status assigned => ready for code review
2024-11-25 14:49 gabrieljenik Note Added: 81502
2024-11-25 15:48 DenisChenu Assigned To DenisChenu => tibor.pacalat
2024-11-25 15:48 DenisChenu Status ready for code review => ready for testing
2024-11-25 17:53 tibor.pacalat Note Added: 81504