View Issue Details

IDProjectCategoryView StatusLast Update
11847Bug reports[All Projects] Theme editorpublic2017-07-21 17:07
ReporterDenisChenuAssigned ToLouisGac 
PrioritynoneSeverityminor 
Status closedResolutionfixed 
Product Version2.55.x 
Target Version3.0Fixed in Version3.x 
Summary11847: Don't move all template in asset directory (views not needed)
DescriptionActually : we move whole template to assets : i think we must add a "assets" directory.

But this causes other concerns : what to do with {TEMPLATEURL} : actual one use real templateurl : not asset => then updating an image source update only the viewed source after F5 reload.

It's OK for css image
Additional InformationUnsure if we need 2 url or not ? ASSETURL ? Complex for Survey manager ...
TagsNo tags attached.
Complete LimeSurvey version number (& build)20161031
I will donate to the project if issue is resolvedNo
Browsernot relevant
Database & DB-Versionnot relevant
Operating System (Server)not relevant
Webserver software & versionnot relevant
PHP Versionnot relevant

Activities

DenisChenu

DenisChenu

2016-10-31 02:15

developer   ~41608

Last edited: 2016-10-31 02:15

View 2 revisions

If you have 5 minutes before "big update" and if you find another idea for "image source"

Another idea:
Add 2 files directory : one for assets + one for files

The one for assets is used by "user who know it's better to have an asset (and {TEMPLATEASSETURL}", other user use "base dir".

PS: this can wait AFTER the big update of thursday.

LouisGac

LouisGac

2016-10-31 10:06

developer   ~41613

http://www.yiiframework.com/doc/api/1.1/CAssetManager#excludeFiles-detail
DenisChenu

DenisChenu

2016-10-31 10:22

developer   ~41615

You want to exclude files directory ? But : is user want to use body{background-image(../files/bg.jpg)} ....

It work actually, but what for TEMPLATEASSETURL
DenisChenu

DenisChenu

2016-10-31 14:33

developer   ~41618

OUps ... sorry : you think 'add viewdirectory' to excludeFiles.

Yep : great idea
DenisChenu

DenisChenu

2016-10-31 15:38

developer   ~41619

....

And if , for another package : we need views directory .....

Must extend clientScript->registerPackage ...

For another release than 3.0
LouisGac

LouisGac

2016-10-31 15:52

developer   ~41620

Indeed, only JS, CSS and pictures needs to be in the assets (anything that the browser can cache). Views will never be cached by the browser, so they can be excluded without problems.
DenisChenu

DenisChenu

2016-10-31 18:59

developer   ~41622

Yes : but :

Solution 1: adding asset directory with js/css and files
- {TEMPLATEURL} don't go to asseturl
- Survey with {TEMPLATEURL}/files/mypicture.png are broken
Solution to fix : use {TEMPLATEURL} as {{TEMPLATEASSETURL} ?

Solution 2: adding only js/css and files directory and put views and pstpl in excludeFiles
- Seems can be done globally => maybe some package/asset want files.
- I don't found in Yii a solution to add excludeFiles in the package configuration : this is surely/maybe the best solution actually. But this solution need more work/time than i have currently.
DenisChenu

DenisChenu

2016-11-04 02:14

developer   ~41710

https://github.com/LimeSurvey/LimeSurvey/blob/answers_html/application/models/TemplateConfiguration.php#L214

About other assets system in fact : we have php in some other assets (third_party)
LouisGac

LouisGac

2016-11-15 19:06

developer   ~41967

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

DenisChenu

2016-11-16 00:00

developer   ~41973

We can not exclude by *.pstpl and *.php ....

Yii have an 'includeFilesTypes' https://github.com/LimeSurvey/LimeSurvey/blob/master/framework/utils/CFileHelper.php#L144
but not an excludeFilesTypes ....
LouisGac

LouisGac

2016-11-16 09:52

developer   ~41974

It has been added to Yii2. For Yii1, they say that if someone wants it, he should a PR. Maybe I'll do it:
https://github.com/yiisoft/yii/issues/258
DenisChenu

DenisChenu

2016-11-16 10:13

developer   ~41976

Yes : about .php files : it come from bootsrap : really think it's not needed too.

But : think there are a bug by us :
    'bootstrap' => array(
        'basePath' => 'bootstrap',
...

No : we have a assets directory inside bs, then must be (i think)
    'bootstrap' => array(
        'basePath' => 'bootstrap.assets',

But : fonts are not in assets .... maybe boostrap need fix too ;).

About boostrap : what do you think about something like this

1. fix bs assets to include font
2. don't include boostrap.css in boostrap in internal : it's already in template and in admin theme


PS : php files in assets directory :
https://framabin.org/?9a722854d7e151ff#0qmPIcx31vlGkU5tVLoGhdgSaCs804GM6DkTJxa6fKs=
DenisChenu

DenisChenu

2016-12-07 11:38

developer   ~42431

It's not only about php/view file

It's too for an asset directory in template. Less files in this dir, only needed files in this directory etc ....
c_schmitz

c_schmitz

2017-07-21 17:07

administrator   ~44125

Version 3.0.0-beta.1 released

Related Changesets

LimeSurvey: master 3085e0a9

2016-11-15 19:05:25

LouisGac

Details Diff
fixed issue 11847: Don't move all template in asset directory (views not needed)
mod - application/config/internal.php Diff File

Issue History

Date Modified Username Field Change
2016-10-31 02:12 DenisChenu New Issue
2016-10-31 02:15 DenisChenu Assigned To => LouisGac
2016-10-31 02:15 DenisChenu Status new => feedback
2016-10-31 02:15 DenisChenu Note Added: 41608
2016-10-31 02:15 DenisChenu Note Edited: 41608 View Revisions
2016-10-31 10:06 LouisGac Note Added: 41613
2016-10-31 10:22 DenisChenu Note Added: 41615
2016-10-31 10:22 DenisChenu Status feedback => assigned
2016-10-31 14:33 DenisChenu Note Added: 41618
2016-10-31 14:34 DenisChenu Assigned To LouisGac => DenisChenu
2016-10-31 15:38 DenisChenu Assigned To DenisChenu =>
2016-10-31 15:38 DenisChenu Status assigned => feedback
2016-10-31 15:38 DenisChenu Note Added: 41619
2016-10-31 15:52 LouisGac Note Added: 41620
2016-10-31 18:59 DenisChenu Note Added: 41622
2016-10-31 18:59 DenisChenu Status feedback => new
2016-11-04 02:14 DenisChenu Note Added: 41710
2016-11-14 16:07 LouisGac Assigned To => LouisGac
2016-11-14 16:07 LouisGac Status new => assigned
2016-11-15 18:15 LouisGac Sticky Issue No => Yes
2016-11-15 19:06 LouisGac Changeset attached => LimeSurvey master 3085e0a9
2016-11-15 19:06 LouisGac Note Added: 41967
2016-11-15 19:06 LouisGac Resolution open => fixed
2016-11-15 19:08 LouisGac Sticky Issue Yes => No
2016-11-16 00:00 DenisChenu Note Added: 41973
2016-11-16 09:52 LouisGac Note Added: 41974
2016-11-16 10:13 DenisChenu Note Added: 41976
2016-12-07 11:36 LouisGac Status assigned => resolved
2016-12-07 11:38 DenisChenu Note Added: 42431
2017-02-21 11:45 c_schmitz Fixed in Version => 3.x
2017-07-21 17:07 c_schmitz Note Added: 44125
2017-07-21 17:07 c_schmitz Status resolved => closed