View Issue Details

This bug affects 1 person(s).
 10
IDProjectCategoryView StatusLast Update
10299Bug reportsOtherpublic2016-06-02 19:35
Reporterasshank Assigned Toc_schmitz  
PrioritylowSeverityminor 
Status closedResolutionfixed 
Product Version2.50.x 
Fixed in Version2.50.x 
Summary10299: usertemplate preview not found
Description

When 'usertemplaterootdir' and 'usertemplaterooturl' are modified to point to map outside of limesurvey the preview of the template is not found.

I have modified the function getTemplateListWithPreviews() in file 'application\models\Template.php' to correct this problem.

Additional Information

see attached file

TagsNo tags attached.
Attached Files
Template.php (10,697 bytes)
Bug heat10
Complete LimeSurvey version number (& build)
I will donate to the project if issue is resolved
Browser
Database type & version
Server OS (if known)
Webserver software & version (if known)
PHP Version

Relationships

related to 10739 closedLouisGac theme css are loaded before controller or view css 

Users monitoring this issue

greenglaz

Activities

asshank

asshank

2016-02-04 10:30

reporter   ~34559

Last edited: 2016-02-04 18:59

it is lime 2.5 160202!

DenisChenu

DenisChenu

2016-02-04 16:12

developer   ~34570

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

DenisChenu

DenisChenu

2016-02-04 16:15

developer   ~34571

Last edited: 2016-02-04 16:15

@Louis : except for "commit" message : fix seems OK. (i can take the pull and ask to BertHankes to fix commit mesages)

@asshank : you use some static system for template file ? For survey speed ?

Just want to know if

  • Easy way to update usertemplaterootdir: you have to hack config-defaulmt or it can be done in config.php
  • Why you do it.

Denis

asshank

asshank

2016-02-12 10:18

reporter   ~34980

@DenisChenu

A lot is going on with 2.50+ :-)
I have installed 160212 and no change on models/Template.php so far on this issue.

Can you give me an update? Is it going to happen? Is my PR not in order?

DenisChenu

DenisChenu

2016-02-12 10:53

developer   ~34981

Hi asshank : Louis is the 250 manager and take this bug :)

asshank

asshank

2016-03-03 20:17

reporter   ~35928

@Louis : take a look at this... It seems a bit strange: an upload/ dir outside of lime framework.
But a 'hardcoded bit' remaines in template.php and should be changed into 'softcoded'.

LouisGac

LouisGac

2016-03-03 20:22

developer   ~35929

Carsten is the manager, I'm just the main coder ^^

asshank, would be nice if you provide me a step by step guide to reproduce the bug. Like :

  1. Install limesurvey here
  2. Create a virtualhost, or an alias pointing here
  3. Move this directory here
    etc.
asshank

asshank

2016-03-03 21:27

reporter   ~35934

Hard to do. Another way of pointing to the problem:

There is a $config['usertemplaterooturl'] setting

This is not used in
application/model/Template.php
function getTemplateListWithPreviews()
line 330 is using Yii::app()->request->baseUrl

By making use of the $config['usertemplaterooturl'] setting the code is more softcoded and will work for upload/ dirs outside of limeroot

see https://github.com/LimeSurvey/LimeSurvey/pull/427

And I pointed the situation out to DenisChenu https://bugs.limesurvey.org/view.php?id=10299#c34591

asshank

asshank

2016-05-29 11:23

reporter   ~38999

@DenisChenu
Can you look into this issue again.
It is IMHO still not right that
$config['standardtemplaterooturl']
and
$config['usertemplaterooturl']
are not used.
The $config has to have a purpose :-)

DenisChenu

DenisChenu

2016-05-30 09:08

developer   ~39002

See my coment on pull request : commit is great . But not the commit message

c_schmitz

c_schmitz

2016-05-30 14:40

administrator   ~39019

Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=19252

c_schmitz

c_schmitz

2016-05-30 15:37

administrator   ~39022

Thank you!

c_schmitz

c_schmitz

2016-06-02 19:35

administrator   ~39107

Version 2.50 Build 150602 released

Related Changesets

LimeSurvey: master 7da08ef1

2016-05-30 08:02:51

Bert Hankes

Details Diff
Update Template.php

Fixed issue 10299: template preview not found on Survey quick actions
Affected Issues
10299
mod - application/models/Template.php Diff File

LimeSurvey: master 239e6efa

2016-05-30 12:40:43

c_schmitz

Details Diff
Merge pull request #498 from BertHankes/patch-6

Fixed issue 10299: template preview not found on Survey quick actions
Affected Issues
10299
mod - application/models/Template.php Diff File

Issue History

Date Modified Username Field Change
2016-02-04 10:29 asshank New Issue
2016-02-04 10:29 asshank File Added: Template.php
2016-02-04 10:30 asshank Note Added: 34559
2016-02-04 16:12 DenisChenu Note Added: 34570
2016-02-04 16:13 DenisChenu Assigned To => LouisGac
2016-02-04 16:13 DenisChenu Status new => assigned
2016-02-04 16:15 DenisChenu Note Added: 34571
2016-02-04 16:15 DenisChenu Note Edited: 34571
2016-02-04 18:51 asshank Note View State: 34559: private
2016-02-04 18:51 asshank Note View State: 34559: public
2016-02-04 18:59 asshank Note Edited: 34559
2016-02-07 04:44 greenglaz Issue Monitored: greenglaz
2016-02-12 10:18 asshank Note Added: 34980
2016-02-12 10:53 DenisChenu Note Added: 34981
2016-02-12 10:53 DenisChenu Product Version 2.06 => 2.5
2016-03-03 20:17 asshank Note Added: 35928
2016-03-03 20:22 LouisGac Note Added: 35929
2016-03-03 21:27 asshank Note Added: 35934
2016-03-10 16:46 c_schmitz Priority normal => low
2016-03-10 19:01 DenisChenu Relationship added related to 10739
2016-05-29 11:23 asshank Note Added: 38999
2016-05-29 17:31 DenisChenu Assigned To LouisGac => DenisChenu
2016-05-30 09:07 DenisChenu Project Development => Bug reports
2016-05-30 09:07 DenisChenu Category Templates => Other issues
2016-05-30 09:08 DenisChenu Note Added: 39002
2016-05-30 09:25 c_schmitz Assigned To DenisChenu => c_schmitz
2016-05-30 14:40 Changeset attached => LimeSurvey master 7da08ef1
2016-05-30 14:40 c_schmitz Changeset attached => LimeSurvey master 239e6efa
2016-05-30 14:40 c_schmitz Note Added: 39019
2016-05-30 14:40 c_schmitz Resolution open => fixed
2016-05-30 15:37 c_schmitz Note Added: 39022
2016-05-30 15:37 c_schmitz Status assigned => resolved
2016-05-30 15:37 c_schmitz Fixed in Version => 2.5
2016-06-02 19:35 c_schmitz Note Added: 39107
2016-06-02 19:35 c_schmitz Status resolved => closed
2021-08-02 23:42 guest Bug heat 8 => 10