Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

Survey Copy - Pictures Do Not Show

  • jancom
  • jancom's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
7 years 4 days ago #151255 by jancom
Survey Copy - Pictures Do Not Show was created by jancom
Hi Guys

I am not sure if this is the right forum. I made a copy of a survey. The questions are all pictures with multiple choice answers. None of the pictures show in the copied version, not even on the front page.

I can add them back in, but I hope there is a better option.

I am working on the latest version (2.64.2+).

Any ideas?

Jan

Jan Combrink
GrowLive!
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
7 years 4 days ago #151260 by holch
Replied by holch on topic Survey Copy - Pictures Do Not Show
How are the images implemented? Via a URL from the internet or uploaded directly to the survey? In the first case it should work, in the second case I don't think the images are copied with the survey. You probably have to upload the images for the new survey, then they should show up.

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

The following user(s) said Thank You: jancom
The topic has been locked.
  • jancom
  • jancom's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
7 years 4 days ago - 7 years 4 days ago #151264 by jancom
Replied by jancom on topic Survey Copy - Pictures Do Not Show
Thank you for the reply Holch. I uploaded the pictures directly to LimeSurvey through the editor, and inserted it that way. Yes, I was hoping I will not have to redo all the pictures again.

Do you suggest that it is better to have a separate picture store/cache somewhere and not use the LS functionality?

Jan Combrink
GrowLive!
Last edit: 7 years 4 days ago by jancom.
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
7 years 4 days ago - 7 years 4 days ago #151267 by holch
Replied by holch on topic Survey Copy - Pictures Do Not Show
Storying the files via Limesurvey is the simple solution, if you don't have any other options. I rarely use this feature, so I actually don't know much about it. But I assume that these files do not get copied over to the new survey. So they are basically missing in the surveys upload folder. I also don't know where they are stored. Can you post the link to one image from each survey? This would give a good indication on where Limesurvey expects the files to be. Probably somewhere in the "uploads" folder. If this is the case (and you have access to the server where Limesurvey is installed), you could try to copy all images via FTP in the respective new folder. Then probably the links will fit again. But not sure and I don't have an example to see how it works.

If you store the images elsewhere and just reference them via fixed URL, there should be no problem at all when copying surveys and you don't need the space various times. So if you are copying a survey on a regular basis and have a lot of images, I would recommend to save the images in one place (can be on the same server as Limesurvey) and then reference them directly via the URL. You'll have the images only once and it is easier to handle. For surveys that will be used only once this doesn't really matter.

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

Last edit: 7 years 4 days ago by holch.
The following user(s) said Thank You: jancom
The topic has been locked.
  • jancom
  • jancom's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
7 years 4 days ago #151269 by jancom
Replied by jancom on topic Survey Copy - Pictures Do Not Show
Yes, your arguments are correct. I had to re-upload the pictures to get them back. The links from the html look like this:
"" src="/360survey/upload/surveys/643182/images/OIHHGN0.jpg", with 643182 being the survey number, which obviously changed, from the previous survey number, when I copied the survey.

And yes you are also correct that it is stored and that copying them over will do the trick. Bit of a schlep though. Could have been nice if it happened programmatically. I wonder why it doe not?

Thanks for you help. I have learned again.

Jan

Jan Combrink
GrowLive!
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
7 years 4 days ago #151270 by holch
Replied by holch on topic Survey Copy - Pictures Do Not Show
Maybe a bug or lack of resources. You have to keep in mind that a lot of this program is or was developed by volunteers in their spare time and it is provided free of charge. So not everything that would be nice or desireable might be implemented. There are many features that could or should be there. But of course rescources are limited.

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

The following user(s) said Thank You: jancom
The topic has been locked.
More
7 years 4 days ago #151275 by jelo
Replied by jelo on topic Survey Copy - Pictures Do Not Show

holch wrote: You probably have to upload the images for the new survey, then they should show up.

Correct, the paths are already changed. So you just need to upload the files with same names to let them reappear.

In older version we had the nice bug, that the image paths weren't updated. If you did a few copys, the images were always delivered from the first survey image folder. If someone deleted that first, old survey everything was gone. Was quite surprised that even copy on the same LS installation isn't copying the files of images. No issues around download big files via browser.

I still don't get why files and images are not copied. Same issue happens with questiontype upload, where the archive function won't contain the files. So you don't have the complete responses.
It would be better to have a folder display for all files related to a survey to keep user on alert about what is placed where.

The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
The following user(s) said Thank You: jancom
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
7 years 4 days ago #151285 by tpartner
Replied by tpartner on topic Survey Copy - Pictures Do Not Show
You can export/import all survey resources (images and files) in the survey settings.



Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Attachments:
The topic has been locked.
More
7 years 4 days ago #151291 by jelo
Replied by jelo on topic Survey Copy - Pictures Do Not Show

tpartner wrote: You can export/import all survey resources (images and files) in the survey settings.

Thanks for the reminder. I had forgotten that section. Anyone knows why this not part of the import/export dialog?

The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
The following user(s) said Thank You: jancom
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
7 years 3 days ago #151307 by DenisChenu
Replied by DenisChenu on topic Survey Copy - Pictures Do Not Show
Must be 2 feature request
1. Copy uploaded files when copy a survey [with checkbox ?]
2. Add an 'export resources' in export menu or export dialog

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The following user(s) said Thank You: jancom
The topic has been locked.
More
6 years 6 months ago #158311 by jrromanow
Replied by jrromanow on topic Survey Copy - Pictures Do Not Show
On the "Create, import, or copy survey" page there is a switch for "Convert resource links and expression fields?". It defaults to "On". If you change it to "Off" the links of the new survey will still point to the images you uploaded for the old survey, so you don't need to copy or upload them to the new survey's images directory.

I would very much like to be able to make this switch default to "Off", as it has caused us much grief, but I can't find anything in the settings to do that.
The topic has been locked.
More
5 years 3 months ago - 5 years 3 months ago #178004 by domsson
Replied by domsson on topic Survey Copy - Pictures Do Not Show
For anyone else who stumbles upon the problem of referencing pictures in a more portable way, I found a nice solution. Note, however, that I'm working with LimeSurvey 3, not sure if it also works in 2. Anyway, here goes: instead of hardcoding the survey ID, use the placeholder {SID}. So to stick with the OP's example:

Instead of this:
Code:
<img src="/360survey/upload/surveys/643182/images/OIHHGN0.jpg">

Do this:
Code:
<img src="/360survey/upload/surveys/{SID}/images/OIHHGN0.jpg">

Now, if you move/migrate the survey and it's ID changes, all should be well! Hope this will help someone.
Last edit: 5 years 3 months ago by domsson.
The following user(s) said Thank You: holch, LouisGac
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose