Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

survey search button with https link in "action" instead of http

More
2 hours 25 minutes ago - 1 hour ago #274379 by Darkjoyce
LimeSurvey version: 6.16.15
Own server or LimeSurvey Cloud: Limesurvey CE on our own server
==================

Hello, we recently upgraded Limesurvey CE from 6.3.2 to 6.16.15.
In the admin page, the "survey search" function has been coded differently, creating a small issue we did not have before : 
     - in 6.3.2, the source code was <form class="" id="yw0" action="/limesurvey-6.3.2/limesurvey/index.php/surveyAdministration/listsurveys" method="get">
     - in 6.16.15, the source code is <form id="survey-search" action="https://oursurveywebsite" method="get">

The problem is that, depending of our environnements where the limesurvey is running, the "action" link in the search button is sometimes with "http" and sometime with "https". When it is with http only, then occurs a warning in our web browser. 

The source code extracted from the https://oursurveywebsite/index.php/dashboard/view page, allow us to see that other difference : 
     - LS.data = {"baseUrl":"https:\/\/oursurveywebsite","showScriptName":true,"urlFormat":"path"....} on our test environnement
     - LS.data = {"baseUrl":"http:\/\/oursurveywebsite","showScriptName":true,"urlFormat":"path"....} on our production environnement

This variable "baseUrl" seems to constructed by the LimeScript.php file, from the Yii:app()getBaseUrl(true); function. 

But my question is : why sometime it is built with https and sometime only http ? 
(on our production environnement, we are behind a reverse proxy, that we don't have on our test environnement). 

I had a look in config-defaults.php, up to force this value to the one we want, but , the only part that could fit is this one : 
// === Advanced Setup
//The following url and dir locations do not need to be modified unless you have a non-standard
//LimeSurvey installation. Do not change unless you know what you are doing.

// The public URL is the URL that is used for anything that is facing a survey participant.
// It can be used to have a separation / distinction between a public URL for surveys and a private one for
// the administration - for example for certain proxy configurations or internal/external domain separation
if (!isset($argv[0]) && Yii::app() != null) {
    $config 'publicurl' = Yii::app()->baseUrl . '/'; // The public website location (url) of the public survey script
} else {
    $config 'publicurl' = '/';
}


But for the moment, I did not manage to make this work when I add it into the config.php file. 

Thanks for you help. 
Last edit: 1 hour ago by Darkjoyce.

Please Log in to join the conversation.

More
1 hour 52 minutes ago #274384 by jelo
Not sure if many users use the search function at all.
Since we cannot rule an bug I would recommend to first update to or nstall the newest build of LimeSurvey 6.
Check again and report as bug the issue is still there. Could be the reverse proxy which makes an impact.
Difficult to guess from the outside.

The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users

Please Log in to join the conversation.

More
55 minutes ago #274392 by Darkjoyce
Thanks Jelo about the latest release, I will handle it on a test bench. 

But my question is : can I "Force" the publicurl or baseUrl variable with value I want, by writing it in the config.php file ? 
Does anyone had already tried this ? 

Thanks for your tips. 

Please Log in to join the conversation.

Moderators: holchtpartner

Lime-years ahead

Online-surveys for every purse and purpose