View Issue Details

This bug affects 2 person(s).
 18
IDProjectCategoryView StatusLast Update
08426Feature requestsTheme editorpublic2022-04-01 16:17
ReporterDenisChenu Assigned To 
PriorityhighSeverityfeature 
Status newResolutionopen 
Summary08426: Unable to update an existing template by upload without update survey settings
Description

If 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 Reproduce

Create 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 Information

Think 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.
Bug heat18
Story point estimate
Users affected %

Relationships

related to 17267 closedollehar Bug reports Allow to update question theme by uploading zip file again 
related to 17321 closedgabrieljenik Bug reports Array question are not split up on mobile devices when using vanilla theme 

Users monitoring this issue

2BITS_PL, ritapas

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

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

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)

ritapas

ritapas

2022-03-21 10:06

reporter   ~68767

For what it's worth, I give an upvote for this bug report

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
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
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
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
2021-05-22 18:26 DenisChenu Relationship added related to 17321
2022-03-21 10:06 ritapas Note Added: 68767
2022-03-21 10:06 ritapas Bug heat 6 => 8
2022-03-30 05:57 user345189 Bug heat 8 => 10
2022-03-30 08:43 DenisChenu Bug heat 10 => 8
2022-03-30 10:19 ritapas Issue Monitored: ritapas
2022-03-30 10:19 ritapas Bug heat 8 => 10
2022-03-30 10:20 guest Bug heat 10 => 16
2022-04-01 16:17 2BITS_PL Issue Monitored: 2BITS_PL
2022-04-01 16:17 2BITS_PL Bug heat 16 => 18