View Issue Details

This bug affects 1 person(s).
 12
IDProjectCategoryView StatusLast Update
11405Bug reportsOtherpublic2016-07-21 14:30
Reporteraltay Assigned ToLouisGac 
PrioritynoneSeverityminor 
Status closedResolutionfixed 
Product Version2.50.x 
Fixed in Version2.50.x 
Summary11405: .css and .js not loading on public pages
Description

Environment:
CentOS 6.8 (64-bit), limesurvey250plus-build160614, postgres9.4, php-5.3.3-47, httpd-2.2.15-53.

Following installation admin pages show fine. When a survey is created, preview works fine. When the survey is published, .css and .js does not appear to load on the public pages.

Steps To Reproduce

Install limesurvey250plus-build160614 on a CentOS 6.8 system.
Install and configure postgres9.4.
Configure httpd.
Login through the admin interface.
Create a new survey.
Publish the survey.
Look at the survey using the survey URL.

Additional Information

When config.php is put in debug 1 or 2, the problem disappears and the style sheets load fine.

TagsNo tags attached.
Attached Files
bugls.PNG (50,611 bytes)   
bugls.PNG (50,611 bytes)   
bugls2.PNG (53,216 bytes)   
bugls2.PNG (53,216 bytes)   
css1.jpg (73,895 bytes)   
css1.jpg (73,895 bytes)   
lm_view_debug0.html (7,895 bytes)   
<!DOCTYPE html>
<html lang="fr">
	<head>
<!-- startpage.pstl -->
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" type="text/css" href="/tmp/assets/10c08b38/css/font-awesome.min.css" />
<link rel="stylesheet" type="text/css" href="/tmp/assets/18b263fe/css/jquery-ui-custom.css" />
<link rel="stylesheet" type="text/css" href="/styles-public/expressions.css" />
<script type="text/javascript" src="/tmp/assets/44ab45cd/jquery-2.2.4.min.js"></script>
<script type="text/javascript" src="/tmp/assets/b104aa30/js/jquery-ui-1.11.4.min.js"></script>
<script type="text/javascript" src="/tmp/assets/18b263fe/scripts/template.js"></script>
<script type="text/javascript" src="/scripts/survey_runtime.js"></script>
<script type="text/javascript" src="/scripts/admin/expression.js"></script>
<script type="text/javascript" src="/scripts/expressions/em_javascript.js"></script>
<script type="text/javascript">
/*<![CDATA[*/
LSvar={"bFixNumAuto":1,"bNumRealValue":0,"sLEMradix":","};
/*]]>*/
</script>
<title>test2</title>
<meta name="generator" content="LimeSurvey http://www.limesurvey.org" />

<!-- The following line includes jquery-ui.css or jquery-ui-custom.css from template dir, template.css and needed specific css file for survey -->


<!-- The following line includes jquery.js, jquery-ui.js, survey_runtime.js , template.js and needed specific js file for survey -->

<link rel="shortcut icon" href="/templates/default/favicon.ico" />

</head>
<body class="default lang-fr groupbygroup bootstrap-engine  showprogress showqnumcode-X"><script type="text/javascript">
/*<![CDATA[*/
setJsVar();
/*]]>*/
</script>


    <nav class="navbar navbar-default navbar-fixed-top" id="topsurveymenubar">
      <div class="container">
        <div class="navbar-header col-xs-12 col-sm-6 col-lg-8">
          <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
            <span class="sr-only">Toggle navigation</span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
          </button>
          <span class="navbar-brand col-xs-10 col-sm-12" >test2</span>
        </div>

        <div id="navbar" class="navbar-collapse collapse col-xs-12">
          <ul class="nav navbar-nav">
          </ul>
          <ul class="nav navbar-nav navbar-right">
            <li><a href="#" id="loadallbtnlink" >Charger un questionnaire non terminé</a></li>
            <li><a href="#" id="clearallbtnlink">Sortir et effacer vos réponses</a></li>
            
          </ul>
        </div><!--/.nav-collapse -->
      </div>
    </nav>


    <!-- Top container -->
    <div id="topContainer" class="jumbotron">
        <div class="container">
            
            
        </div>
    </div>

    <div class="outerframe container" id="outerframeContainer">

        <div class="row" id="main-row">

            <div class='col-xs-12' id="yii-flash-message">
                
            </div>

            <div class="col-sm-12 col-centered" id="main-col">
<!-- end of startpage.pstl -->
<form id="limesurvey" name="limesurvey" autocomplete="off" class="frontend_helper" action="/index.php/625334" method="post">
<input type="hidden" value="9dd589f84c021b5aadd68966f7cc70b239da3ca3" name="YII_CSRF_TOKEN" /><div class="alert alert-danger" role="alert"  id="checkjavascript">
    <noscript><span class='warningjs'>Attention : l’exécution de JavaScript est désactivée dans votre navigateur. Vous risquez de ne pas pouvoir répondre à toutes les questions. Veuillez vérifier les paramètres de votre navigateur.</span></noscript>
</div>
<script>
document.getElementById("checkjavascript").style.display = 'none';
</script>
<!-- Survey Description -->
<div class="row" id="welcome-container">
    <div class="col-sm-12 ">
        <h1>test2</h1><br />
        <p class='surveydescription text-info'></p>
    </div>
</div>

<!-- Survey Welcome -->
<div class="row survey-welcome">
    <div class="col-sm-12 ">
        <p class='surveywelcome'>
            
        </p>
    </div>
</div>

<!-- Question number -->
<div class="row questions-number">
    <div class="col-sm-12">
        <p class="x-questions">Il y a 1 question dans ce questionnaire</p>
    </div>
</div>

<!-- Navigator hidden-xs-->
<div class="col-xs-12">
    <div class="row" id="navigator-container">
        <div class="col-xs-12 save-all hidden">
            <button type="submit" id="loadallbtn" value="loadall" name="loadall" class="saveall btn btn-default col-xs-12 col-sm-4 submit button hidden">Charger un questionnaire non terminé</button>
            <button type="submit" id="clearall" value="clearall" name="clearall" class="clearall button  btn btn-default btn-lg  col-xs-4 hidden" data-confirmedby="confirm-clearall" title="Cette action doit être confirmée.">Sortir et effacer vos réponses</button><input id="confirm-clearall" value="confirm" class="hide jshide  btn btn-default btn-lg  col-xs-4" type="checkbox" name="confirm-clearall" /><label class="hide jshide  btn btn-default btn-lg  col-xs-4" for="confirm-clearall">Êtes-vous sûr de vouloir effacer toutes vos réponses?</label>
        </div>
        <div class="col-xs-12 save-all">
            <hr/>
        </div>
        <div class="col-xs-6 save-all text-left">
            
        </div>
        <div class="col-xs-6 save-all text-right">
            <button type="submit" id="movenextbtn" value="movenext" name="movenext" accesskey="n" class="submit button btn btn-lg  btn-primary">Suivant</button>
        </div>
    </div>
</div>

<input type='hidden' name='sid' value='625334' id='sid' />

<input type='hidden' name='lastgroupname' value='_WELCOME_SCREEN_' id='lastgroupname' />
<input type='hidden' name='LEMpostKey' value='1647597322' id='LEMpostKey' />
<input type='hidden' name='thisstep' id='thisstep' value='0' />
<!--frontendhelper --></form>        </div> <!-- main-col -->
    </div><!-- main-row -->
</div><!-- outerframe -->

<!-- Bootstrap Modal Alert -->
<div id="bootstrap-alert-box-modal" class="modal fade">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header" style="min-height:40px;">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                <h4 class="modal-title">&nbsp;</h4>
            </div>
            <div class="modal-body"><p></p></div>
            <div class="modal-footer">
                <a href="#" data-dismiss="modal" class="btn btn-default">Fermer</a>
            </div>
        </div>
    </div>
</div>

<script type='text/javascript'>
<!--
var LEMmode='group';
var LEMgseq=-1;
function ExprMgr_process_relevance_and_tailoring(evt_type,sgqa,type){
if (typeof LEM_initialized == 'undefined') {
LEM_initialized=true;
LEMsetTabIndexes();
}
if (evt_type == 'onchange' && (typeof last_sgqa !== 'undefined' && sgqa==last_sgqa) && (typeof last_evt_type !== 'undefined' && last_evt_type == 'TAB' && type != 'checkbox')) {
  last_evt_type='onchange';
  last_sgqa=sgqa;
  return;
}
last_evt_type = evt_type;
last_sgqa=sgqa;

}
//-->
</script>


	<script type="text/javascript" src="/tmp/assets/192fb46b/js/bootstrap.min.js"></script>
<script type="text/javascript">
/*<![CDATA[*/
jQuery('body').popover({'selector':'a[rel=popover]'});
jQuery('body').tooltip({'selector':'a[rel=tooltip]'});
/*]]>*/
</script>
</body>
</html>
<!-- end of frontend_helper /  display_first_page -->
lm_view_debug0.html (7,895 bytes)   
lm_view_debug1.html (8,386 bytes)   
<!DOCTYPE html>
<html lang="fr">
	<head>
<!-- startpage.pstl -->
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" type="text/css" href="/tmp/assets/10c08b38/css/font-awesome.min.css" />
<link rel="stylesheet" type="text/css" href="/templates/default/css/jquery-ui-custom.css" />
<link rel="stylesheet" type="text/css" href="/templates/default/css/bootstrap-slider.css" />
<link rel="stylesheet" type="text/css" href="/templates/default/css/awesome-bootstrap-checkbox/awesome-bootstrap-checkbox.css" />
<link rel="stylesheet" type="text/css" href="/templates/default/css/flat_and_modern.css" />
<link rel="stylesheet" type="text/css" href="/templates/default/css/template.css" />
<link rel="stylesheet" type="text/css" href="/styles-public/expressions.css" />
<script type="text/javascript" src="/tmp/assets/44ab45cd/jquery-2.2.4.min.js"></script>
<script type="text/javascript" src="/tmp/assets/b104aa30/js/jquery-ui-1.11.4.min.js"></script>
<script type="text/javascript" src="/scripts/survey_runtime.js"></script>
<script type="text/javascript" src="/templates/default/scripts/template.js"></script>
<script type="text/javascript" src="/templates/default/scripts/bootstrap-slider.js"></script>
<script type="text/javascript" src="/scripts/admin/expression.js"></script>
<script type="text/javascript" src="/scripts/expressions/em_javascript.js"></script>
<script type="text/javascript">
/*<![CDATA[*/
LSvar={"bFixNumAuto":1,"bNumRealValue":0,"sLEMradix":","};
/*]]>*/
</script>
<title>test2</title>
<meta name="generator" content="LimeSurvey http://www.limesurvey.org" />

<!-- The following line includes jquery-ui.css or jquery-ui-custom.css from template dir, template.css and needed specific css file for survey -->


<!-- The following line includes jquery.js, jquery-ui.js, survey_runtime.js , template.js and needed specific js file for survey -->

<link rel="shortcut icon" href="/templates/default/favicon.ico" />

</head>
<body class="default lang-fr groupbygroup bootstrap-engine  showprogress showqnumcode-X"><script type="text/javascript">
/*<![CDATA[*/
setJsVar();
/*]]>*/
</script>


    <nav class="navbar navbar-default navbar-fixed-top" id="topsurveymenubar">
      <div class="container">
        <div class="navbar-header col-xs-12 col-sm-6 col-lg-8">
          <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
            <span class="sr-only">Toggle navigation</span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
          </button>
          <span class="navbar-brand col-xs-10 col-sm-12" >test2</span>
        </div>

        <div id="navbar" class="navbar-collapse collapse col-xs-12">
          <ul class="nav navbar-nav">
          </ul>
          <ul class="nav navbar-nav navbar-right">
            <li><a href="#" id="loadallbtnlink" >Charger un questionnaire non terminé</a></li>
            <li><a href="#" id="clearallbtnlink">Sortir et effacer vos réponses</a></li>
            
          </ul>
        </div><!--/.nav-collapse -->
      </div>
    </nav>


    <!-- Top container -->
    <div id="topContainer" class="jumbotron">
        <div class="container">
            
            
        </div>
    </div>

    <div class="outerframe container" id="outerframeContainer">

        <div class="row" id="main-row">

            <div class='col-xs-12' id="yii-flash-message">
                
            </div>

            <div class="col-sm-12 col-centered" id="main-col">
<!-- end of startpage.pstl -->
<form id="limesurvey" name="limesurvey" autocomplete="off" class="frontend_helper" action="/index.php/625334" method="post">
<input type="hidden" value="9dd589f84c021b5aadd68966f7cc70b239da3ca3" name="YII_CSRF_TOKEN" /><div class="alert alert-danger" role="alert"  id="checkjavascript">
    <noscript><span class='warningjs'>Attention : l’exécution de JavaScript est désactivée dans votre navigateur. Vous risquez de ne pas pouvoir répondre à toutes les questions. Veuillez vérifier les paramètres de votre navigateur.</span></noscript>
</div>
<script>
document.getElementById("checkjavascript").style.display = 'none';
</script>
<!-- Survey Description -->
<div class="row" id="welcome-container">
    <div class="col-sm-12 ">
        <h1>test2</h1><br />
        <p class='surveydescription text-info'></p>
    </div>
</div>

<!-- Survey Welcome -->
<div class="row survey-welcome">
    <div class="col-sm-12 ">
        <p class='surveywelcome'>
            
        </p>
    </div>
</div>

<!-- Question number -->
<div class="row questions-number">
    <div class="col-sm-12">
        <p class="x-questions">Il y a 1 question dans ce questionnaire</p>
    </div>
</div>

<!-- Navigator hidden-xs-->
<div class="col-xs-12">
    <div class="row" id="navigator-container">
        <div class="col-xs-12 save-all hidden">
            <button type="submit" id="loadallbtn" value="loadall" name="loadall" class="saveall btn btn-default col-xs-12 col-sm-4 submit button hidden">Charger un questionnaire non terminé</button>
            <button type="submit" id="clearall" value="clearall" name="clearall" class="clearall button  btn btn-default btn-lg  col-xs-4 hidden" data-confirmedby="confirm-clearall" title="Cette action doit être confirmée.">Sortir et effacer vos réponses</button><input id="confirm-clearall" value="confirm" class="hide jshide  btn btn-default btn-lg  col-xs-4" type="checkbox" name="confirm-clearall" /><label class="hide jshide  btn btn-default btn-lg  col-xs-4" for="confirm-clearall">Êtes-vous sûr de vouloir effacer toutes vos réponses?</label>
        </div>
        <div class="col-xs-12 save-all">
            <hr/>
        </div>
        <div class="col-xs-6 save-all text-left">
            
        </div>
        <div class="col-xs-6 save-all text-right">
            <button type="submit" id="movenextbtn" value="movenext" name="movenext" accesskey="n" class="submit button btn btn-lg  btn-primary">Suivant</button>
        </div>
    </div>
</div>

<input type='hidden' name='sid' value='625334' id='sid' />

<input type='hidden' name='lastgroupname' value='_WELCOME_SCREEN_' id='lastgroupname' />
<input type='hidden' name='LEMpostKey' value='1820006183' id='LEMpostKey' />
<input type='hidden' name='thisstep' id='thisstep' value='0' />
<!--frontendhelper --></form>        </div> <!-- main-col -->
    </div><!-- main-row -->
</div><!-- outerframe -->

<!-- Bootstrap Modal Alert -->
<div id="bootstrap-alert-box-modal" class="modal fade">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header" style="min-height:40px;">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                <h4 class="modal-title">&nbsp;</h4>
            </div>
            <div class="modal-body"><p></p></div>
            <div class="modal-footer">
                <a href="#" data-dismiss="modal" class="btn btn-default">Fermer</a>
            </div>
        </div>
    </div>
</div>

<script type='text/javascript'>
<!--
var LEMmode='group';
var LEMgseq=-1;
function ExprMgr_process_relevance_and_tailoring(evt_type,sgqa,type){
if (typeof LEM_initialized == 'undefined') {
LEM_initialized=true;
LEMsetTabIndexes();
}
if (evt_type == 'onchange' && (typeof last_sgqa !== 'undefined' && sgqa==last_sgqa) && (typeof last_evt_type !== 'undefined' && last_evt_type == 'TAB' && type != 'checkbox')) {
  last_evt_type='onchange';
  last_sgqa=sgqa;
  return;
}
last_evt_type = evt_type;
last_sgqa=sgqa;

}
//-->
</script>


	<script type="text/javascript" src="/tmp/assets/192fb46b/js/bootstrap.js"></script>
<script type="text/javascript">
/*<![CDATA[*/
jQuery('body').popover({'selector':'a[rel=popover]'});
jQuery('body').tooltip({'selector':'a[rel=tooltip]'});
/*]]>*/
</script>
</body>
</html>
<!-- end of frontend_helper /  display_first_page -->
lm_view_debug1.html (8,386 bytes)   
Bug heat12
Complete LimeSurvey version number (& build)limesurvey250plus-build16061
I will donate to the project if issue is resolvedNo
BrowserFirefox 46.0
Database type & versionpostgres9.4
Server OS (if known)CentOS 6.8
Webserver software & version (if known)httpd-2.2.15-53
PHP Versionphp-5.3.3-47

Users monitoring this issue

vincentb

Activities

vincentb

vincentb

2016-06-20 10:38

reporter   ~39695

Hello,
We have the same problem on 2 servers Ubuntu 12.04.5 LTS with MySQL database.
PHP Version : 5.3.10
Browser : Firefox 47.0 / Chrome 51.0.2704.103

When Limesurvey is in debug mode, CSS and JS load fine.

LouisGac

LouisGac

2016-06-20 12:08

developer   ~39696

is your tmp folder on a exotic place?

vincentb

vincentb

2016-06-20 12:21

reporter   ~39698

No, it's in the default folder :
$config['tempdir'] = $config['rootdir'].DIRECTORY_SEPARATOR."tmp";

LouisGac

LouisGac

2016-06-20 12:30

developer   ~39701

ok.
could you please send us a screenshot of the error? (like in chrome tools, etc)

vincentb

vincentb

2016-06-20 13:47

reporter   ~39709

We actually have no error : no HTTP 404, nothing in Apache log files.
We just have the survey loading without CSS (see screenshot of the source code).

LouisGac

LouisGac

2016-06-20 13:56

developer   ~39710

Last edited: 2016-06-20 13:56

the css files are no more loaded between those comments

<!-- The following line includes jquery-ui.css or jquery-ui-custom.css from template dir, template.css and needed specific css file for survey -->

<!-- The following line includes jquery.js, jquery-ui.js, survey_runtime.js , template.js and needed specific js file for survey

I should update it.

They are loaded on top of it (see attached screenshot)
Could you please provide a new screenshot? Thanks.

c_schmitz

c_schmitz

2016-06-20 13:56

administrator   ~39711

Can you please attach the full HTML page? Thank you.

vincentb

vincentb

2016-06-20 14:07

reporter   ~39713

Ok, sorry. I have uploaded 2 files :

  • lm_view_debug0.html is the source code when debug value is 0 (when the problem occurs),
  • lm_view_debug1.html is the source code when debug value is 1 (the problem does not occur).
LouisGac

LouisGac

2016-06-20 14:17

developer   ~39716

thx

LouisGac

LouisGac

2016-06-20 14:39

developer   ~39717

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

LouisGac

LouisGac

2016-06-20 14:43

developer   ~39718

could you provide a link to the survey?

vincentb

vincentb

2016-06-20 14:55

reporter   ~39720

Here is the link to a test survey : https://gestpoll.fondation-ove.fr/index.php/625334

I have applied your commit but it doesn't change anything if i'm not in debug mode.
In the "application/helpers/replacements_helper.php" file, I am going into the "if(!YII_DEBUG)" condition, and not in the "else" condition.

131 if(!YII_DEBUG)
132 { echo "test template";
133 Yii::app()->clientScript->registerPackage( 'survey-template' );
134 }
135 else
136 {
137 .....

The text "test template" is displayed on the survey page.

Thanks

LouisGac

LouisGac

2016-06-20 14:57

developer   ~39721

yep sorry, indeed, the commit wasn't a fix for your problem....

LouisGac

LouisGac

2016-06-20 15:13

developer   ~39722

it seems that your SSL certificate is not up to date, causing the errors.

vincentb

vincentb

2016-06-20 15:29

reporter   ~39723

Sorry, but I have deactivated SSL on limesurvey, and i still got the same problem.

LouisGac

LouisGac

2016-06-20 16:06

developer   ~39738

yep that very strange, because all the files are in the asset directory. For example :
http://gestpoll.fondation-ove.fr/tmp/assets/18b263fe/config.xml
http://gestpoll.fondation-ove.fr/tmp/assets/18b263fe/css/template.css
http://gestpoll.fondation-ove.fr/tmp/assets/18b263fe/css/flat_and_modern.css

some of them are published (like http://gestpoll.fondation-ove.fr/tmp/assets/18b263fe/scripts/template.js), some are not published (like http://gestpoll.fondation-ove.fr/tmp/assets/18b263fe/scripts/bootstrap-slider.js)

also, when you try to access to a directory you have an error message :
http://gestpoll.fondation-ove.fr/tmp/assets/18b263fe/scripts/

maybe related...

whatever, it seems to be related to your server configuration rather than to limesurvey. Nobody never experienced something like that by the past.

If you provide me some credential to connect to the server, I could try to fin what's happen.

LouisGac

LouisGac

2016-06-21 10:25

developer   ~39759

let me know if you find anything related to this problem, or if you want us to give more test. For now, you're the only one experiencing that bug.

Are you using plugins ?

vincentb

vincentb

2016-06-21 12:27

reporter   ~39774

Last edited: 2016-06-21 12:27

Hi,

I don't really think it's a server side problem, as we have 2 instances on two disctint servers. Both have the same problem at the same time. And the user altay, who opened this bug, has the same problem.

I have looked again this morning, and think I have a hint.
The CSS files are loaded in the file application/models/TemplateConfiguration.php, inside the private function createTemplatePackage() function.

CSS are defined by this line : $aCssFiles = (array) $this->config->files->css->filename;
But this give me only the first item on the config file :

$aCssFiles = (array) $this->config->files->css->filename;
var_dump($aCssFiles);

Result :
array(1) {
[0]=> string(24) "css/jquery-ui-custom.css"
}

But if write this :
$test =(array) $this->config->files->css;
$aCssFiles = $test['filename'];
var_dump($aCssFiles);

Result :
array(5) {
[0]=> string(24) "css/jquery-ui-custom.css"
[1]=> string(24) "css/bootstrap-slider.css"
[2]=> string(61) "css/awesome-bootstrap-checkbox/awesome-bootstrap-checkbox.css"
[3]=> string(23) "css/flat_and_modern.css"
[4]=> string(16) "css/template.css"
}
And I have my CSS back on my LimeSurvey instance.

I don't know PHP enough to understand what is really the difference between the 2 solutions, but I think the problem comes from here.
Same problem and same solution for JS files defined in the same function.

LouisGac

LouisGac

2016-06-21 12:42

developer   ~39777

that's what I call a server side problem...
I think we really should rise the minimum PHP version to 5.5
PHP 5.3 is soooo buggy...
https://goo.gl/mho0SX

Thank you for your deep investigation.
I will implement a "fix" around it

LouisGac

LouisGac

2016-06-21 12:56

developer   ~39780

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

LouisGac

LouisGac

2016-06-21 12:57

developer   ~39781

vincentb : could you apply the commit to test if it resolves the problem?

vincentb

vincentb

2016-06-21 13:57

reporter   ~39782

Thanks, but I just tried the commit, but no difference, problem still there. Sorry :s

LouisGac

LouisGac

2016-06-21 14:03

developer   ~39783

ok I'm going to install a VM with PHP 5.3

hermann

hermann

2016-07-05 14:31

reporter   ~39831

I had the very same problem. The fix in
https://github.com/LimeSurvey/LimeSurvey/commit/1b26318658b43e767ae41e7e8bc9e2530cac50cc#diff-7724b0b4a704b4e5592ea1093a9f4c14
did not help me as well. I tried using xpath() instead and that solved the problem for me.

@altay: Could you please try to apply this patch:
https://github.com/LimeSurvey/LimeSurvey/files/347713/use_xpath_to_fix_issue_11405.txt

Greetings
Hermann

LouisGac

LouisGac

2016-07-05 14:36

developer   ~39832

hey hermann, could you confirm you're using php 5.3 ?

hermann

hermann

2016-07-05 14:56

reporter   ~39833

Hi LouisGac,

sorry forgot to add that here (as I did in the comment on the github-commit):
PHP 5.3.3
Red Hat Enterprise Linux Server release 6.8

Greetings
Hermann

LouisGac

LouisGac

2016-07-05 15:00

developer   ~39834

ok. I'll apply your patch.
Still : don't forgot that PHP 5.3 is no more maintained, and PHP official team remind it's full of bugs and security issues. See:
http://php.net/supported-versions.php

hermann

hermann

2016-07-05 15:35

reporter   ~39836

Thanks, LouisGac,

regarding the patch/fix: Denis Chenu suggests (https://github.com/LimeSurvey/LimeSurvey/commit/1b26318658b43e767ae41e7e8bc9e2530cac50cc#commitcomment-18124301) I should make a pull request.
Do you take the patch-file I sent an hour ago or shall I create that pull request?

LouisGac

LouisGac

2016-07-05 15:49

developer   ~39837

Well, if you want to create a pull request would be perfect, and then you'll can proudly prove that you contribute to LimeSurvey ;-)

THank you again for your implication.

davidrnewman

davidrnewman

2016-07-06 00:27

reporter   ~39838

This problem is also occuring on my installation. It started as soon as I did the comfort update to limesurvey250plus-build160620.tar.bz2. All the user interface for survey responses has disappeared. See
http://www.e-consultation.org/survey/index.php/826621?lang=en

I am using PHP version 5.3.10

Any chance of an ordinary download without having to set up git?

hermann

hermann

2016-07-06 10:01

reporter   ~39839

@LouisGac: Just made a pull-request on github:
https://github.com/LimeSurvey/LimeSurvey/pull/518

hermann

hermann

2016-07-06 10:09

reporter   ~39840

Hi davidrnewman,

same here: no more css- and js-styling after comfort update to build160620. This is a php compatibility problem: in (at least) 5.3.x not all "array-contexts" are recognised by simplexml when using the '->' operator. I.e. only the first of all configured css- and js-files is loaded.
But it works when the xpath() method is used.

So a quick fix would be to download this patch:
https://github.com/LimeSurvey/LimeSurvey/files/347713/use_xpath_to_fix_issue_11405.txt
and apply it. Or change those 5 lines manually if you can't use patch(1).

LouisGac

LouisGac

2016-07-06 10:23

developer   ~39841

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

LouisGac

LouisGac

2016-07-06 10:24

developer   ~39842

Ok I merged the PR.
But again: using PHP 5.3.x is a very bad idea.

davidrnewman

davidrnewman

2016-07-06 13:42

reporter   ~39844

Thanks for the patch, hermann, that worked.

I am stuck with PHP 5.3.x because my hosting provider is using an older Ubuntu LTS version.

LouisGac

LouisGac

2016-07-06 13:59

developer   ~39845

davidrnewman : well that's not acceptable. You should threat your host provider to move to a more serious one.

PHP team officially says that PHP 5.3 is not safe to use. Soon, even 5.5 will not be supported anymore.

See:
http://php.net/supported-versions.php

Staying on 5.3: you're in danger.

LouisGac

LouisGac

2016-07-21 14:30

developer   ~40006

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

Related Changesets

LimeSurvey: master e5268c72

2016-06-20 12:39:38

LouisGac

Details Diff
Fixed issue 11405: .css and .js not loading on public pages (on specific servers) Affected Issues
11405
mod - application/helpers/replacements_helper.php Diff File

LimeSurvey: master 1b263186

2016-06-21 10:55:31

LouisGac

Details Diff
Fixed issue 11405: .css and .js not loading on public pages
Dev: used a temporary variable using a temporary variable to array dereference the result of the simpleXML methods (PHP < 5.4 compatibility).
Affected Issues
11405
mod - application/models/TemplateConfiguration.php Diff File

LimeSurvey: master ede82d50

2016-07-06 07:53:09

hermann

Details Diff
Fixed 11405: for php compatibility-reasons use xpath() instead of '->' to retrieve array of settings from config.xml Affected Issues
11405
mod - application/models/TemplateConfiguration.php Diff File

LimeSurvey: master c8b12f02

2016-07-06 08:23:08

LouisGac


Committer: GitHub Details Diff
Merge pull request #518 from hermannschwaerzlerUIBK/master

Fixed 11405: for php compatibility-reasons use xpath() instead of '-…
Affected Issues
11405
mod - application/models/TemplateConfiguration.php Diff File

LimeSurvey: master 867f830c

2016-07-21 12:29:56

LouisGac

Details Diff
Fixed issue 11405: .css and .js not loading on public pages
Fixed issue 11476: CSS and JS files not included at "default" template though {TEMPLATECSS} and {TEMPLATEJS} placeholders exist
Affected Issues
11405, 11476
mod - application/models/TemplateConfiguration.php Diff File

Issue History

Date Modified Username Field Change
2016-06-17 20:15 altay New Issue
2016-06-20 10:32 vincentb Issue Monitored: vincentb
2016-06-20 10:38 vincentb Note Added: 39695
2016-06-20 12:08 LouisGac Note Added: 39696
2016-06-20 12:21 vincentb Note Added: 39698
2016-06-20 12:30 LouisGac Note Added: 39701
2016-06-20 13:47 vincentb Note Added: 39709
2016-06-20 13:48 vincentb File Added: bugls.PNG
2016-06-20 13:48 vincentb File Added: bugls2.PNG
2016-06-20 13:56 LouisGac File Added: css1.jpg
2016-06-20 13:56 LouisGac Note Added: 39710
2016-06-20 13:56 c_schmitz Note Added: 39711
2016-06-20 13:56 LouisGac Note Edited: 39710
2016-06-20 14:04 vincentb File Added: lm_view_debug0.html
2016-06-20 14:05 vincentb File Added: lm_view_debug1.html
2016-06-20 14:07 vincentb Note Added: 39713
2016-06-20 14:17 LouisGac Note Added: 39716
2016-06-20 14:39 LouisGac Changeset attached => LimeSurvey master e5268c72
2016-06-20 14:39 LouisGac Note Added: 39717
2016-06-20 14:39 LouisGac Assigned To => LouisGac
2016-06-20 14:39 LouisGac Resolution open => fixed
2016-06-20 14:43 LouisGac Note Added: 39718
2016-06-20 14:55 vincentb Note Added: 39720
2016-06-20 14:57 LouisGac Note Added: 39721
2016-06-20 15:13 LouisGac Note Added: 39722
2016-06-20 15:29 vincentb Note Added: 39723
2016-06-20 15:59 LouisGac Sticky Issue No => Yes
2016-06-20 16:06 LouisGac Note Added: 39738
2016-06-20 16:15 LouisGac Sticky Issue Yes => No
2016-06-21 10:25 LouisGac Note Added: 39759
2016-06-21 12:27 vincentb Note Added: 39774
2016-06-21 12:27 vincentb Note Edited: 39774
2016-06-21 12:42 LouisGac Note Added: 39777
2016-06-21 12:53 LouisGac Sticky Issue No => Yes
2016-06-21 12:56 LouisGac Changeset attached => LimeSurvey master 1b263186
2016-06-21 12:56 LouisGac Note Added: 39780
2016-06-21 12:57 LouisGac Note Added: 39781
2016-06-21 13:57 vincentb Note Added: 39782
2016-06-21 14:03 LouisGac Note Added: 39783
2016-06-22 10:57 LouisGac Sticky Issue Yes => No
2016-07-05 14:31 hermann Note Added: 39831
2016-07-05 14:36 LouisGac Note Added: 39832
2016-07-05 14:56 hermann Note Added: 39833
2016-07-05 15:00 LouisGac Note Added: 39834
2016-07-05 15:35 hermann Note Added: 39836
2016-07-05 15:49 LouisGac Note Added: 39837
2016-07-06 00:27 davidrnewman Note Added: 39838
2016-07-06 10:01 hermann Note Added: 39839
2016-07-06 10:09 hermann Note Added: 39840
2016-07-06 10:23 hermann Changeset attached => LimeSurvey master ede82d50
2016-07-06 10:23 LouisGac Changeset attached => LimeSurvey master c8b12f02
2016-07-06 10:23 LouisGac Note Added: 39841
2016-07-06 10:24 LouisGac Note Added: 39842
2016-07-06 13:42 davidrnewman Note Added: 39844
2016-07-06 13:59 LouisGac Note Added: 39845
2016-07-19 11:23 c_schmitz Status new => closed
2016-07-19 11:23 c_schmitz Fixed in Version => 2.5
2016-07-21 14:30 LouisGac Changeset attached => LimeSurvey master 867f830c
2016-07-21 14:30 LouisGac Note Added: 40006
2021-08-02 22:09 guest Bug heat 10 => 12