View Issue Details

This bug affects 1 person(s).
 6
IDProjectCategoryView StatusLast Update
20114Bug reportsExpression Managerpublic2025-06-18 10:15
ReporterMazi Assigned Toadamzammit  
PrioritynoneSeverityblock 
Status assignedResolutionopen 
Product Version6.6.x 
Summary20114: queXML export doesn't replace EM placeholders
Description

When enabling the "Print answers" feature at a survey, there is a "Export to queXML PDF" button shown. When exporting the given data set to queXML, EM placeholders do not get replaced and the export looks weird - actually you can not really use it, see attached screenshot.

Steps To Reproduce

Steps to reproduce

Import and activate the attached survey.
Run the survey.
Click "Print answers" link at the thank you page.
Use queXML PDF export.

Expected result

Replace EM placeholders for given data set.

Actual result

Unreadable EM syntax is still shown

TagsNo tags attached.
Attached Files
image.png (42,910 bytes)   
image.png (42,910 bytes)   
limesurvey_survey_654535.lss (1,410,168 bytes)
Bug heat6
Complete LimeSurvey version number (& build)6.13.3
I will donate to the project if issue is resolvedNo
Browser
Database type & versionMariaDB 10.1.48
Server OS (if known)
Webserver software & version (if known)
PHP Version8.2

Relationships

related to 20139 new Export as QueXML with debug 2 and 8.3.22 : throw error 

Users monitoring this issue

There are no users monitoring this issue.

Activities

Mazi

Mazi

2025-05-20 10:36

updater   ~82713

@adamzammit, not sure if you usually deal with such queXML stuff?!

adamzammit

adamzammit

2025-05-21 04:16

developer   ~82727

thanks @Mazi. Yes queXML is my area.

If the user wants the queXML PDF export at the "print answers" functionality just for seeing their web responses on a form, it does make sense to execute/replace all the EM code.

But if the user is using it to produce a semi-filled form to later use queXF to process the paper form, then processing the EM will likely break the form's compatibility with queXF as the variable nature will change the layout of the pages.

I'm happy to make a change to execute the EM code, but my preference would be for it to be a configuration option that isn't the default. Would that suit you?

Adam

Mazi

Mazi

2025-05-21 10:01

updater   ~82728

@adamzammit, I fully agree. This adjustment only makes sense for writing a single data set as PDF. We should be able to differentiate this from the other use cases so it would be great if you could look into this.

Mazi

Mazi

2025-06-11 12:15

updater   ~82863

@adamzammit, is there any news regarding a fix for this issue? The user is asking because they want to run a large study at the end of the month.

adamzammit

adamzammit

2025-06-12 05:19

developer   ~82866

thanks for checking in @Mazi.

I've run into a bit of a roadblock. Processing EM for a response currently relies on the survey session being set.

I can get it to process the EM for things like this {rand(0,100)} but for prefills response data I'm not sure if this can be done without messing around with session data

Mazi

Mazi

2025-06-12 09:29

updater   ~82867

@adamzammit, I think there is no other way then generating the session data for the given data set ID. But maybe @DenisChenu has some ideas on how to deal with this?

DenisChenu

DenisChenu

2025-06-12 11:13

developer   ~82868

Last edited: 2025-06-12 11:13

I've run into a bit of a roadblock. Processing EM for a response currently relies on the survey session being set.

It's the case when you came for Print answers after survey done. Maybe check if session is set, if yes : use Expresssion manager.
If not : do not use it.

https://github.com/LimeSurvey/LimeSurvey/blob/edc725d17768264e547d17c4ddd32c9306e37d67/application/controllers/PrintanswersController.php#L51

I think there is no other way then generating the session data for the given data set ID. But maybe @DenisChenu has some ideas on how to deal with this?

https://gitlab.com/SondagesPro/RemoteControl/RemoteManageResponse/-/blob/main/RemoteControlHandler.php?ref_type=heads#L193
and the older one
https://gitlab.com/SondagesPro/coreAndTools/reloadAnyResponse/-/blob/master/reloadResponse.php?ref_type=heads#L55

adamzammit

adamzammit

2025-06-18 07:00

developer   ~82893

hi @Mazi can you give this change a test and see what you think.

https://github.com/LimeSurvey/LimeSurvey/compare/master...adamzammit:LimeSurvey:fix-20114

DenisChenu

DenisChenu

2025-06-18 09:56

developer   ~82894

Hey !
What is this pklugins ?
L'extension LSBugTrackerHistory n'existe pas, les paramètres ne sont pas importés
L'extension LSBugTrackerAdmin n'existe pas, les paramètres ne sont pas importés
L'extension LSBugTracker n'existe pas, les paramètres ne sont pas importés
L'extension LSBugTrackerReport n'existe pas, les paramètres ne sont pas importés
L'extension LSBugTrackerTrackingSide n'existe pas, les paramètres ne sont pas importés

DenisChenu

DenisChenu

2025-06-18 10:15

developer   ~82897

Argl,

Can not test

Issue History

Date Modified Username Field Change
2025-05-20 10:35 Mazi New Issue
2025-05-20 10:35 Mazi File Added: image.png
2025-05-20 10:35 Mazi File Added: limesurvey_survey_654535.lss
2025-05-20 10:36 Mazi Note Added: 82713
2025-05-20 10:36 Mazi Bug heat 6 => 8
2025-05-21 04:16 adamzammit Note Added: 82727
2025-05-21 04:16 adamzammit Bug heat 8 => 10
2025-05-21 10:01 Mazi Note Added: 82728
2025-05-28 10:05 tibor.pacalat Assigned To => adamzammit
2025-05-28 10:05 tibor.pacalat Status new => assigned
2025-06-11 12:15 Mazi Note Added: 82863
2025-06-12 05:19 adamzammit Note Added: 82866
2025-06-12 09:29 Mazi Note Added: 82867
2025-06-12 11:13 DenisChenu Note Added: 82868
2025-06-12 11:13 DenisChenu Bug heat 10 => 12
2025-06-12 11:13 DenisChenu Note Edited: 82868
2025-06-13 09:47 Mazi View Status private => public
2025-06-13 09:47 Mazi Bug heat 12 => 6
2025-06-18 07:00 adamzammit Note Added: 82893
2025-06-18 09:56 DenisChenu Note Added: 82894
2025-06-18 10:10 DenisChenu Relationship added related to 20139
2025-06-18 10:15 DenisChenu Note Added: 82897
2025-06-18 10:15 DenisChenu File Added: Capture d’écran du 2025-06-18 10-15-15.png