View Issue Details

IDProjectCategoryView StatusLast Update
14320Bug reports[All Projects] Survey designpublic2019-01-10 16:07
Reportermarkusd1984 Assigned ToLouisGac  
PrioritynoneSeverityminor 
Status assignedResolutionopen 
Product Version3.15.x 
Target VersionFixed in Version 
Summary14320: Copying survey does not copy images from description / text fields
Description

Copying survey does not copy images in the description field and keeps the source code which will display a placeholder.

<p><img alt="" src="/surveys/upload/surveys/123456/images/SurveyWelcomeImage.png" /></p>

Steps To Reproduce

Copy a survey that contains an image in the description or probably any text fields.

TagsNo tags attached.
Complete LimeSurvey version number (& build)3.15.1+181017
I will donate to the project if issue is resolvedNo
BrowserChrome
Database & DB-VersionMySQL
Server OS (if known)
Webserver software & version (if known)
PHP Version7.0

Activities

DenisChenu

DenisChenu

2018-12-06 19:35

developer   ~49898

It was never the case, like export/import or export lsa.

dominikvitt

dominikvitt

2018-12-13 15:14

developer   ~49955

I just tried to copy survey, it works as expected.
It is possible that image HTML code you wrote is copied to a new survey, but you can't see image because image link is wrong.

Please click on "Source" button on text editor.
Can you see HTML code?

DenisChenu

DenisChenu

2018-12-13 16:06

developer   ~49957

@dominikvitt : i think @markusd1984 want to say exactly what you do to ;).

If you have a survey with survey id at 1234 with image source
&lt;img alt=&quot;&quot; src=&quot;/master/upload/surveys/1234/images/image.jpg&quot; />

New survey is is 4321, new image source was
&lt;img alt=&quot;&quot; src=&quot;/master/upload/surveys/4321/images/image.jpg&quot; />

But image was not copied :) in the new survey directory.

@markusd1984 : if you set Convert resource links and expression fields? to off it was not the case when copying : url stay same.
Maybe have 2 options here : one for resource link and one for expression (old INSERTANS)

markusd1984

markusd1984

2018-12-14 11:38

reporter   ~49965

just as DenisChenu mentioned

@dominikvitt I pasted the source code in the report description ;) but i should have pointed out that the survey ID is that of the copy, thus I concluded since the whole path to the image is still there but not rendering the image it must have not copied the image over.

Copying the resources over for the new survey is crucial to avoid conflicts when changing content, ie. otherwise when disabling "Convert resource links and expression fields?" and deleting the image in the original survey it will become unavailable in the copies!

The only reason practically I can think of why i would want to disable it is if I want to duplicate a survey ie. to create different versions/alternatives with the aim of deleting the original/some of the copies to work with one of them as the final master.

But NOT for using it as a means of templates to create a new survey, which is why I'm mainly using it for since there is no build in function for this yet and otherwise requires users to import files. (see feature suggestion https://bugs.limesurvey.org/view.php?id=14329)

LouisGac

LouisGac

2019-01-10 16:03

manager   ~50156

Last edited: 2019-01-10 16:07

View 2 revisions

we now have a parameter to use a single upload directory for all surveys. That's a way to fix the problem.
else, I agree it should copy the pictures.

Issue History

Date Modified Username Field Change
2018-12-05 13:20 markusd1984 New Issue
2018-12-06 19:35 DenisChenu Note Added: 49898
2018-12-13 15:14 dominikvitt Note Added: 49955
2018-12-13 16:06 DenisChenu Note Added: 49957
2018-12-14 11:38 markusd1984 Note Added: 49965
2019-01-10 16:03 LouisGac Note Added: 50156
2019-01-10 16:03 LouisGac Assigned To => LouisGac
2019-01-10 16:03 LouisGac Status new => assigned
2019-01-10 16:07 LouisGac Note Edited: 50156 View Revisions