Check out the LimeSurvey source code on GitHub!

Switching Languages fails

More
5 years 9 months ago - 5 years 9 months ago #59184 by dleger
Hello,

MY survey has 2 languages. French and English. When switching from one language to another, it tried to open the link to the other version, however, the domain name is not present so it fails.

So it goes from

www.surveydomain.com/index.phpXXXXXXXXX

to

index.phpXXXXXXXX

ps: i dunnop why, but the h ttp:// won't show above when I post... But it is there in the url bar during the survey.

I tried searching but could not find any other postings that were similar.

Thanks in Advance for your help.
Last Edit: 5 years 9 months ago by dleger.

Please Log in to join the conversation.

More
5 years 9 months ago - 5 years 9 months ago #59239 by dleger
This is a sample of what I mean...

equusfeedback.ca//index.php?sid=66963&newtest=Y&lang=en

After hitting "Next"... If you try to switch the language, the domain name gets lost.


I can run the URL for the french survey no problem if I use the direct link.
Last Edit: 5 years 9 months ago by dleger.

Please Log in to join the conversation.

More
5 years 9 months ago #59241 by dleger
QUick update...

I looked at the code from the actual running survey, and noticed this

<select name="select" class='languagechanger' onchange="javascript:window.location=this.value">
<option value="//index.php?sid=66963&lang=en">English</option>
<option value="//index.php?sid=66963&lang=fr" >French</option>
</select>

Under option value, the URL is not showing... I see a reference to calss languagechanger... Which I assume refers to the language.php file. I'm not a programmer, but can handle some basics... But I can't find where it might cause the root url to be missing.

Please Log in to join the conversation.

More
5 years 9 months ago #59242 by dleger
OK.. I found a workaround...

IN the index.php file, there is a section to "Create" the languageswitcher...

There is a variable that is supposed to put the url..$relativeurl

I replaced it with the actual URL and it works.

Obviously not the ideal, but it will work for now until I figure out how to ensure $relativeurl is properly set. I haven't found where the variable is set yet.

Please Log in to join the conversation.

More
5 years 9 months ago #59267 by DenisChenu
Hello,

Maybe your rooturl in config.php are false ?

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).

Please Log in to join the conversation.

Imprint                   Privacy policy         General Terms & Conditions         Revocation information and revocation form