Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1
  • 2

TOPIC: URL mapping changed after 2.05 update

URL mapping changed after 2.05 update 7 months 2 weeks ago #104312

  • macanics
  • macanics's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 8
  • Karma: 0
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: 7 months 2 weeks ago by DenisChenu. Reason: Use example.com dedicated domain
The administrator has disabled public write access.

URL mapping changed after 2.05 update 7 months 2 weeks ago #104318

  • holch
  • holch's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 2670
  • Thank you received: 320
  • Karma: 120
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.
Have a look at the manual! It is a really valuable source for information. Here some helpful links:
Manual (EN) | Question Types | Question Attributes | Workarounds

If you found this answer helpful and it saved you some time please consider a donation to the project to keep Limesurvey going!
Last Edit: 7 months 2 weeks ago by holch.
The administrator has disabled public write access.

URL mapping changed after 2.05 update 7 months 2 weeks ago #104322

  • macanics
  • macanics's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 8
  • Karma: 0
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 administrator has disabled public write access.

URL mapping changed after 2.05 update 7 months 2 weeks ago #104324

  • holch
  • holch's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 2670
  • Thank you received: 320
  • Karma: 120
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
Have a look at the manual! It is a really valuable source for information. Here some helpful links:
Manual (EN) | Question Types | Question Attributes | Workarounds

If you found this answer helpful and it saved you some time please consider a donation to the project to keep Limesurvey going!
The administrator has disabled public write access.

URL mapping changed after 2.05 update 7 months 2 weeks ago #104325

  • DenisChenu
  • DenisChenu's Avatar
  • OFFLINE
  • Moderator Lime
  • Posts: 6323
  • Thank you received: 812
  • Karma: 242
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
The administrator has disabled public write access.

URL mapping changed after 2.05 update 7 months 2 weeks ago #104346

  • holch
  • holch's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 2670
  • Thank you received: 320
  • Karma: 120
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.
Have a look at the manual! It is a really valuable source for information. Here some helpful links:
Manual (EN) | Question Types | Question Attributes | Workarounds

If you found this answer helpful and it saved you some time please consider a donation to the project to keep Limesurvey going!
The administrator has disabled public write access.

URL mapping changed after 2.05 update 7 months 2 weeks ago #104347

  • DenisChenu
  • DenisChenu's Avatar
  • OFFLINE
  • Moderator Lime
  • Posts: 6323
  • Thank you received: 812
  • Karma: 242
Hi Holch.

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

Denis
The administrator has disabled public write access.

URL mapping changed after 2.05 update 7 months 2 weeks ago #104350

  • holch
  • holch's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 2670
  • Thank you received: 320
  • Karma: 120
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.
Have a look at the manual! It is a really valuable source for information. Here some helpful links:
Manual (EN) | Question Types | Question Attributes | Workarounds

If you found this answer helpful and it saved you some time please consider a donation to the project to keep Limesurvey going!
The administrator has disabled public write access.

URL mapping changed after 2.05 update 7 months 2 weeks ago #104352

  • DenisChenu
  • DenisChenu's Avatar
  • OFFLINE
  • Moderator Lime
  • Posts: 6323
  • Thank you received: 812
  • Karma: 242
No,

Only since 2.05 default controller update
The administrator has disabled public write access.

URL mapping changed after 2.05 update 1 month 2 weeks ago #111295

  • joop
  • joop's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 8
  • Karma: 0
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 administrator has disabled public write access.
  • Page:
  • 1
  • 2
Moderators: ITEd
Time to create page: 0.259 seconds
Donation Image