Welcome to the LimeSurvey Community Forum

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

URL mapping changed after 2.05 update

  • macanics
  • macanics's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
10 years 1 month ago - 10 years 1 month ago #104312 by macanics
URL mapping changed after 2.05 update was created by macanics
Last December I upgraded our venerable 1.92 install to 2.05, and encountered a few irregularities mainly involved with faulty validations due to inappropriate variable names. Mostly fixed, but some issues persisted so updated to the most current 2.05 version last week.
Now users report that previously working URLs of the form:
survey.example.com/index.php?sid=nnnnn&lang=en
now no longer work, but resolve to the public survey list page.
URLs of the form:
survey.example.com/index.php/35592/lang-en
work as expected, but of course survey URLs to active surveys have already been advertised.

I thought I might be able to fix this in routes.php, but the code is beyond me. Anyone got any ideas to fix this, either an edit in the routes folder, or a redirect or rewrite?
cheers, ---john---

Version 2.05+ Build 140125
Last edit: 10 years 1 month ago by DenisChenu. Reason: Use example.com dedicated domain
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
10 years 1 month ago - 10 years 1 month ago #104318 by holch
Replied by holch on topic URL mapping changed after 2.05 update
If the URLs have already been published, I would rather do a redirect from the published URL to the real URL via .htaccess than try to change anything in the Limesurvey code.

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

Last edit: 10 years 1 month ago by holch.
The topic has been locked.
  • macanics
  • macanics's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
10 years 1 month ago #104322 by macanics
Replied by macanics on topic URL mapping changed after 2.05 update
Probably wise advice.
My htaccess-foo is weak however - can you suggest what rewrite rule I would need to go from
/index.php?sid=nnnnn&lang=en
to
/index.php/nnnnn/lang-en
?
cheers, ---john---
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
10 years 1 month ago #104324 by holch
Replied by holch on topic URL mapping changed after 2.05 update
I am not an expert on htaccess either.

But I assume this should do the trick:
Code:
Redirect /index.php?sid=nnnnn&lang=en /index.php/nnnnn/lang-en

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
10 years 1 month ago #104325 by DenisChenu
Replied by DenisChenu on topic URL mapping changed after 2.05 update
Hi,

macanics wrote: Now users report that previously working URLs of the form:
survey.example.com/index.php?sid=nnnnn&lang=en
now no longer work, but resolve to the public survey list page.
URLs of the form:
survey.example.com/index.php/35592/lang-en
work as expected, but of course survey URLs to active surveys have already been advertised.

There are a bug report for this: bugs.limesurvey.org/view.php?id=8586

I'm not sure htaccess can do the trick ? Because i'm not sure htaccess read the $_GET variable.

An alternative[*] solution can be , in the default template, add a javascript to read url, if this url contain sid=XXXX, redirect to survey.example.com/index.php/XXXX

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
10 years 1 month ago #104346 by holch
Replied by holch on topic URL mapping changed after 2.05 update
Well, I guess I would have a list with the survey URLs that have been sent out already. I assume that this list isn't too long and then I would not make a dynamic redirect, but a list with the fixed urls.

And all surveys urls that will be communicated from now on, will have already the new format.

Of course, if you have hundreds of surveys, this can be a pain. But for 5-10 surveys, this should be quick and the simplest way.

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
10 years 1 month ago #104347 by DenisChenu
Replied by DenisChenu on topic URL mapping changed after 2.05 update
Hi Holch.

1st : this bug need to be fixed ;)
2nd : No, with reading sid=XXXX parameters, you can do for whole survey.

Denis

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
10 years 1 month ago #104350 by holch
Replied by holch on topic URL mapping changed after 2.05 update
I did not realize that this is a bug. I assumed that after the URL format change (since 2.0 I think), old URLs (in the format from 1.9x and before) won't work anymore anyway.

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
10 years 1 month ago #104352 by DenisChenu
Replied by DenisChenu on topic URL mapping changed after 2.05 update
No,

Only since 2.05 default controller update

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.
More
9 years 7 months ago #111295 by joop
Replied by joop on topic URL mapping changed after 2.05 update
Any update on this issue? The bug report has been closed (I guess the developers didn't like the way the reporter responded) but issue is still remains in my opinion.
After upgrade to 2.05 there is no backward compatibility for the old URL format. This is quit a problem if you have multiple surveys where the URL is integrated in other applications and respondents already received invitations with the old URL format.
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
9 years 7 months ago #111296 by holch
Replied by holch on topic URL mapping changed after 2.05 update
In the case of old urls still being out, I would create my own htaccess to forward these old URLs. Not sure if this is considered a bug or simple a difference between the old and the new version.

I would do upgrades only once my old surveys are finished or I have a solution that allows me to migrate.

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

The topic has been locked.
More
9 years 7 months ago #111403 by ahmadaub
Replied by ahmadaub on topic URL mapping changed after 2.05 update
Any luck with old URLs?
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose