URL mapping changed after 2.05 update

More
3 years 5 months ago - 3 years 5 months ago #104312 by macanics
macanics created the topic: URL mapping changed after 2.05 update
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: 3 years 5 months ago by DenisChenu. Reason: Use example.com dedicated domain

Please Log in to join the conversation.

More
3 years 5 months ago - 3 years 5 months ago #104318 by holch
holch replied the 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'm not a LimeSurvey GmbH member. I answer at the LimeSurvey forum in my spare time. No support via private message.
Some helpful links: Manual (EN) | Question Types | Workarounds
Last Edit: 3 years 5 months ago by holch.

Please Log in to join the conversation.

More
3 years 5 months ago #104322 by macanics
macanics replied the 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---

Please Log in to join the conversation.

More
3 years 5 months ago #104324 by holch
holch replied the topic: URL mapping changed after 2.05 update
I am not an expert on htaccess either.

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

I'm not a LimeSurvey GmbH member. I answer at the LimeSurvey forum in my spare time. No support via private message.
Some helpful links: Manual (EN) | Question Types | Workarounds

Please Log in to join the conversation.

More
3 years 5 months ago #104325 by DenisChenu
DenisChenu replied the 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 (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .

Please Log in to join the conversation.

More
3 years 5 months ago #104346 by holch
holch replied the 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'm not a LimeSurvey GmbH member. I answer at the LimeSurvey forum in my spare time. No support via private message.
Some helpful links: Manual (EN) | Question Types | Workarounds

Please Log in to join the conversation.

More
3 years 5 months ago #104347 by DenisChenu
DenisChenu replied the 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 (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .

Please Log in to join the conversation.

More
3 years 5 months ago #104350 by holch
holch replied the 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'm not a LimeSurvey GmbH member. I answer at the LimeSurvey forum in my spare time. No support via private message.
Some helpful links: Manual (EN) | Question Types | Workarounds

Please Log in to join the conversation.

More
3 years 5 months ago #104352 by DenisChenu
DenisChenu replied the 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 (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .

Please Log in to join the conversation.

More
2 years 11 months ago #111295 by joop
joop replied the 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.

Please Log in to join the conversation.

More
2 years 11 months ago #111296 by holch
holch replied the 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'm not a LimeSurvey GmbH member. I answer at the LimeSurvey forum in my spare time. No support via private message.
Some helpful links: Manual (EN) | Question Types | Workarounds

Please Log in to join the conversation.

More
2 years 11 months ago #111403 by ahmadaub
ahmadaub replied the topic: URL mapping changed after 2.05 update
Any luck with old URLs?

Please Log in to join the conversation.

Did you already participate in our customer survey?

Don't miss your chance for great prices.

Please click here to participate:

Start now

Start now!

Just create your account and start using Limesurvey today.

Register now