Check out the LimeSurvey source code on GitHub!
Welcome, Guest
Username: Password:

TOPIC: Switching Languages fails

Switching Languages fails 5 years 3 months ago #59184

  • dleger
  • dleger's Avatar
  • Offline
  • Junior Lime
  • Posts: 26
  • Karma: 0
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 3 months ago by dleger.
The administrator has disabled public write access.

Switching Languages fails 5 years 3 months ago #59239

  • dleger
  • dleger's Avatar
  • Offline
  • Junior Lime
  • Posts: 26
  • Karma: 0
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 3 months ago by dleger.
The administrator has disabled public write access.

Switching Languages fails 5 years 3 months ago #59241

  • dleger
  • dleger's Avatar
  • Offline
  • Junior Lime
  • Posts: 26
  • Karma: 0
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.
The administrator has disabled public write access.

Switching Languages fails 5 years 3 months ago #59242

  • dleger
  • dleger's Avatar
  • Offline
  • Junior Lime
  • Posts: 26
  • Karma: 0
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.
The administrator has disabled public write access.

Switching Languages fails 5 years 3 months ago #59267

  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • Moderator Lime
  • Posts: 9293
  • Thank you received: 1327
  • Karma: 384
Hello,

Maybe your rooturl in config.php are false ?
Assistance on LimeSurvey forum and LimeSurvey core developpement are on my free time (Say thanks ?).
A bug not reported is a bug not corrected. | Please, read the documentation | La doc en français à besoin de vous
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.225 seconds
Imprint                   Data Protection Statement                  Revocation information and revocation form