View Issue Details

This bug affects 1 person(s).
 4
IDProjectCategoryView StatusLast Update
20052Bug reportsImport/Exportpublic2025-04-16 16:52
Reportertwilllig Assigned Togabrieljenik  
PrioritynoneSeveritypartial_block 
Status resolvedResolutionfixed 
Product Version6.6.x 
Summary20052: When copying survey absolute urls in email templates are transformed to reative path
Description

When you have images embedded in your email templates, the url becomes relative after copying the survey.

Problem seems to be that App()->getConfig("publicurl") returns only "/" when called in common_helper.php translateLinks()
The whole survey copying happens in import_helper.php XMLImportSurvey()

Steps To Reproduce

Steps to reproduce

  • Create survey
  • alter invitation email by adding image into textfield (image button in editor)
  • inspect html code of invitation email in html editor
  • copy survey
  • inspect html code of invitation email in html editor

Expected result

  • copied survey invitation email has exact same link as original (except for survey id)
  • sent invitation emails contains the picture

Actual result

  • copied survey invitation email has changed link (from absolute url to relative path)
  • picture is shown fine in editor but not in the email when sent

I added some screenshots

TagsNo tags attached.
Attached Files
Bug heat4
Complete LimeSurvey version number (& build)6.12.4
I will donate to the project if issue is resolvedNo
Browser
Database type & versionmysql
Server OS (if known)
Webserver software & version (if known)
PHP Version8

Users monitoring this issue

There are no users monitoring this issue.

Activities

gabrieljenik

gabrieljenik

2025-04-11 19:56

manager   ~82415

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

tibor.pacalat

tibor.pacalat

2025-04-14 11:05

administrator   ~82420

@gabrieljenik can you please look at the test failures and fix them. I think they are caused by your code changes.

gabrieljenik

gabrieljenik

2025-04-16 13:57

manager   ~82429

Done.

Please find some notes below:

  • It sounds like it should be clarified what a publicURL is and what values ​​it takes?

  • It's notable that the getPublicBaseUrl function only considers the configured publicURL if it's absolute. What happens if the function is called with the parameter set to false (relative). Isn't the public URL used? Now, It's not. Then, maybe the methos name should be changed?

  • Smell there could some bugs in cases when publicUrl is set to an absolute address.

Issue History

Date Modified Username Field Change
2025-04-08 14:20 twilllig New Issue
2025-04-08 14:20 twilllig File Added: Screenshot 2025-04-08 141336.png
2025-04-08 14:20 twilllig File Added: Screenshot 2025-04-08 141025.png
2025-04-08 14:20 twilllig File Added: Screenshot 2025-04-08 at 11.13.32.png
2025-04-08 14:21 tibor.pacalat Assigned To => gabrieljenik
2025-04-08 14:21 tibor.pacalat Status new => assigned
2025-04-11 19:56 gabrieljenik Assigned To gabrieljenik => DenisChenu
2025-04-11 19:56 gabrieljenik Status assigned => ready for code review
2025-04-11 19:56 gabrieljenik Note Added: 82415
2025-04-11 19:56 gabrieljenik Bug heat 0 => 2
2025-04-14 10:02 DenisChenu Assigned To DenisChenu => tibor.pacalat
2025-04-14 10:02 DenisChenu Status ready for code review => ready for testing
2025-04-14 11:05 tibor.pacalat Note Added: 82420
2025-04-14 11:05 tibor.pacalat Bug heat 2 => 4
2025-04-14 16:26 DenisChenu Assigned To tibor.pacalat => gabrieljenik
2025-04-14 16:32 DenisChenu Assigned To gabrieljenik => DenisChenu
2025-04-14 16:33 DenisChenu Assigned To DenisChenu => gabrieljenik
2025-04-14 16:33 DenisChenu Status ready for testing => in code review
2025-04-16 13:57 gabrieljenik Note Added: 82429
2025-04-16 16:52 tibor.pacalat Status in code review => resolved
2025-04-16 16:52 tibor.pacalat Resolution open => fixed