View Issue Details

IDProjectCategoryView StatusLast Update
08426Feature requestsTheme editorpublic2021-04-21 17:10
ReporterDenisChenu Assigned To 
PriorityhighSeverityfeature 
Status newResolutionopen 
Summary08426: Unable to update an existing template by upload without update survey settings
DescriptionIf you try to update an existing template by upload : you have an alert : this template already exist.
Then you have to delete template, upload again the template. But then : survey using this template use default template (even if you don't touch the survey)
Steps To ReproduceCreate a new template,
Export in a zip file
Set a survey with this new template
Delete the template
Reupload the template zip file
Look at survey ....
Additional InformationThink we don't have to touch the survey template when eleting. Because template folder is set to default template (if template dir don't exist) when
- Start the survey
- Update survey settings.

We can remove this line:
$surveys = Survey::model()->findAllByAttributes(array('template' => $templatename));
  foreach ($surveys as $s)
  {
    $s->template = Yii::app()->getConfig('defaulttemplate');
    $s->save();
  }
TagsNo tags attached.

Relationships

related to 17267 assignedollehar Bug reports Allow to update question theme by uploading zip file again 

Activities

c_schmitz

c_schmitz

2013-12-05 11:22

administrator   ~27498

We need to have an option during import that can be checked be the user that allows to overwrite an existing template - OR ask the user if the template already exists if it should be overwritten.
DenisChenu

DenisChenu

2013-12-05 11:27

developer   ~27499

Last edited: 2013-12-05 11:38

View 2 revisions

Yes maybe:
Remove existing template (remove not used files)
OR Replace existing files (leave not used files)
OR do nothing

Ps removing the line don't hurt and is quick : because template are set to default if not exist, then updated only when user update survey settings.

ollehar

ollehar

2021-03-11 13:01

administrator   ~63302

Last edited: 2021-03-11 13:02

View 2 revisions

If downloaded from LimeStore, the name is guaranteed to be unique, so updating is risk free.

This is how plugins work when uploading a zip file, btw.
DenisChenu

DenisChenu

2021-03-11 13:02

developer   ~63303

yes but … LimeStore …
ollehar

ollehar

2021-03-11 13:10

administrator   ~63304

Name collision should be pretty low risk anyway, no?
DenisChenu

DenisChenu

2021-03-11 13:53

developer   ~63309

Have an option seems the best (in my opinion)

Issue History

Date Modified Username Field Change
2013-12-05 08:55 DenisChenu New Issue
2013-12-05 08:55 DenisChenu Project Feature requests => Bug reports
2013-12-05 08:58 DenisChenu LimeSurvey build number OR git commit ID => 131205
2013-12-05 08:58 DenisChenu Browser => not relevant
2013-12-05 08:58 DenisChenu Database & DB-Version => not relevant
2013-12-05 08:58 DenisChenu Operating System (Server) => not relevant
2013-12-05 08:58 DenisChenu Webserver software & version => not relevant
2013-12-05 08:58 DenisChenu PHP Version => not relevant
2013-12-05 08:58 DenisChenu Product Version => 2.00+
2013-12-05 08:58 DenisChenu Summary Unable to update an existing template by upload => Unable to update an existing template by upload without update survey settings
2013-12-05 08:58 DenisChenu Steps to Reproduce Updated View Revisions
2013-12-05 11:21 c_schmitz Project Bug reports => Feature requests
2013-12-05 11:22 c_schmitz Note Added: 27498
2013-12-05 11:27 DenisChenu Note Added: 27499
2013-12-05 11:27 DenisChenu Priority normal => low
2013-12-05 11:27 DenisChenu Product Version 2.00+ =>
2013-12-05 11:38 DenisChenu Note Edited: 27499 View Revisions
2015-12-11 14:40 c_schmitz Category Templates => Theme editor
2021-03-11 13:00 ollehar Priority low => high
2021-03-11 13:01 ollehar Note Added: 63302
2021-03-11 13:02 DenisChenu Note Added: 63303
2021-03-11 13:02 ollehar Note Edited: 63302 View Revisions
2021-03-11 13:10 ollehar Note Added: 63304
2021-03-11 13:53 DenisChenu Note Added: 63309
2021-04-21 17:10 DenisChenu Relationship added related to 17267