View Issue Details

This bug affects 1 person(s).
 6
IDProjectCategoryView StatusLast Update
09857Bug reportsInstallationpublic2015-12-15 13:15
Reporternwinter Assigned ToLouisGac 
PrioritynormalSeverityminor 
Status closedResolutionfixed 
Product Version2.06+ 
Summary09857: LS drawing some css and js files from tmp/assets/ rather than style/ directory
Description

After fresh install (or comfortupdate) LS draws several files from the /tmp/assets/ subdirectories rather than the appropriate admin template directory. This means that edits to the adminstyle.css don't take effect, and when the administrative template is changed, the correct adminstyle.css is not used.

For example, the top of the source for the default administration page is as follows; note that bootstrap.min.css, bootstrap-yii.css, and adminstyle.css are all being taken from /tmp/assets subdirectories:

<!DOCTYPE html>
<html lang="en" dir="ltr" >
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<link rel="stylesheet" type="text/css" href="/limesurvey/third_party/jqgrid/css/ui.jqgrid.css" />
<link rel="stylesheet" type="text/css" href="/limesurvey/third_party/jquery-superfish/css/superfish.css" />
<link rel="stylesheet" type="text/css" href="/limesurvey/third_party/qTip2/dist/jquery.qtip.min.css" />
<link rel="stylesheet" type="text/css" href="/limesurvey/third_party/jquery-notify/ui.notify.css" />
<link rel="stylesheet" type="text/css" href="/limesurvey/tmp/assets/15e71f25/css/bootstrap.min.css" />
<link rel="stylesheet" type="text/css" href="/limesurvey/tmp/assets/15e71f25/css/bootstrap-yii.css" />
<link rel="stylesheet" type="text/css" href="/limesurvey/styles/gringegreen/jquery-ui/jquery-ui.css" />
<link rel="stylesheet" type="text/css" href="/limesurvey/styles/gringegreen/superfish.css" />
<link rel="stylesheet" type="text/css" href="/limesurvey/styles-public/jquery.multiselect.css" />
<link rel="stylesheet" type="text/css" href="/limesurvey/styles-public/jquery.multiselect.filter.css" />
<link rel="stylesheet" type="text/css" href="/limesurvey/styles/gringegreen/displayParticipants.css" />
<link rel="stylesheet" type="text/css" href="/limesurvey/styles/adminstyle.css" />
<link rel="stylesheet" type="text/css" href="/limesurvey/tmp/assets/aca7017f/adminstyle.css" />
<link rel="stylesheet" type="text/css" href="/limesurvey/styles/gringegreen/printablestyle.css" media="print" />
<link rel="stylesheet" type="text/css" href="/limesurvey/tmp/assets/10dbfc39/css/notify.css" />
<script type="text/javascript" src="/limesurvey/tmp/assets/59188505/c_be8b12935ea13f2fe980462f654af579.js"></script>
<script type="text/javascript">
/<![CDATA[/
LS.data = {"baseUrl":"https:\/\/hemings.politics.virginia.edu\/limesurvey","showScriptName":true,"urlFormat":"path","adminImageUrl":"\/limesurvey\/styles\/gringegreen\/images\/","csrfToken":"f74fca34547b35c29276a79090fe14f2cc23bb86","language":"en","replacementFields":{"path":"\/limesurvey\/index.php\/admin\/limereplacementfields\/sa\/index"}};
$.ajaxSetup({data: {YII_CSRF_TOKEN: LS.data.csrfToken}});
LS.messages=[];
/]]>/
</script>
<title>LimeSurvey</title>

Steps To Reproduce

Fresh installation, load admin page, view page source.

TagsNo tags attached.
Bug heat6
Complete LimeSurvey version number (& build)150831
I will donate to the project if issue is resolvedNo
BrowserFirefox (and Chrome)
Database type & version154
Server OS (if known)centOS
Webserver software & version (if known)apache 2.4.6
PHP Version5.4.16

Users monitoring this issue

There are no users monitoring this issue.

Activities

nwinter

nwinter

2015-09-11 22:08

reporter   ~33096

Last edited: 2015-09-11 22:17

I investigated more. I think I understand that some files are supposed to be copied to tmp/assets. There is a hard-coding of the use of adminstyle.css from the gringegreen admin style, even if a different admin template has been selected. See lines 18-19 in the file

application/views/admin/super/header.php

the original line that copies the adminstyle.css is commented out, and replaced with one that hard-codes gringegreen:

    //App()->getClientScript()->registerCssFile(Yii::app()->getConfig('adminstyleurl') . &quot;adminstyle.css&quot; );
    App()->getClientScript()->registerCssFile( App()->getAssetManager()->publish( dirname(Yii::app()->request->scriptFile).'/styles/gringegreen/' . &quot;adminstyle.css&quot;) );

It looks like this change was made with commit f5683e8. It also seems that maybe the other admin templates no longer fully work (if you force their use), for example the darkblue style has problems on the ComfortUpdate check page.

LouisGac

LouisGac

2015-12-09 15:58

developer   ~33817

Now, if any change is made to any file from styles/ directory, the asset tmp version is updated.

c_schmitz

c_schmitz

2015-12-15 13:15

administrator   ~33938

2.06+ Build 151215 released

Issue History

Date Modified Username Field Change
2015-08-31 21:45 nwinter New Issue
2015-09-11 22:08 nwinter Note Added: 33096
2015-09-11 22:17 nwinter Note Edited: 33096
2015-09-15 09:35 sammousa Assigned To => LouisGac
2015-09-15 09:35 sammousa Status new => assigned
2015-12-09 15:58 LouisGac Note Added: 33817
2015-12-09 15:58 LouisGac Status assigned => resolved
2015-12-09 15:58 LouisGac Resolution open => fixed
2015-12-15 13:15 c_schmitz Note Added: 33938
2015-12-15 13:15 c_schmitz Status resolved => closed