View Issue Details

This bug affects 2 person(s).
 40
IDProjectCategoryView StatusLast Update
08239Feature requestsSurvey takingpublic2023-05-17 12:18
Reportermfaber Assigned Togabrieljenik  
PrioritynormalSeverityfeature 
Status ready for testingResolutionfixed 
Summary08239: Allow for user friendly survey URLS
Description

At the moment surveys are published under a relatively complicated url eg. [survey.myserver.com]/index.php/984639/lang-en.

These urls are hard to remember or to transmit to a potential participant (e.g. via telephone or a flyer)

I would like to see a "short-url" setting in the survey settings where one could set a string under which the survey is published.

For example, if the short survey-url is set to "greatsurvey", you could reach it via [survey.myserver.com]/greatsurvey.

Tagsroadmap2020
Bug heat40
Story point estimate
Users affected %

Relationships

parent of 18821 closedtwilllig Bug reports publicurl not used for SURVEYURL 
has duplicate 07834 closedDenisChenu Feature requests Feature Request - Short tag for every survey 
related to 13836 new Feature requests Possibility to alias survey ids 
child of 09111 closedDenisChenu Feature requests Better url (shortest) 

Users monitoring this issue

Activities

DenisChenu

DenisChenu

2013-10-07 09:31

developer   ~26567

Hi mfaver, you can have:

example.org/123564 for url (if you deactivate showScript in config).

But yes : a plugin to have "Little url" can be a good idea

remind the config problem : then

  • index.php/lilurl : path + showScript
  • /lilurl : path - showscript
  • /index.php?r=lilurl (get+showscript : need testing)
  • /?r=lilurl (get - showscript : need testing).

Denis

mfaber

mfaber

2013-10-07 10:43

reporter   ~26568

Last edited: 2021-11-25 10:00

Thanks for the hint and your input!

There's another reason for being able to choose your own URL: If you have given the link to some participants (aaa.com/123456) and now you want to change the survey, the link will change.

With a user url (aaa.com/greatsurvey) you can change the underlying survey and your participants still find it.

+1 for a user selectable short url ;)

DenisChenu

DenisChenu

2013-10-07 10:44

developer   ~26569

Last edited: 2021-11-25 10:00

Hi,

Sometimes i use htaccess directly for this ;)

mfaber

mfaber

2013-10-07 12:35

reporter   ~26574

Last edited: 2021-11-25 10:00

oh, ok, so you can just use a

redirect /aaa.com/limesurvey/123456 /aaa.com/limesurvey/654321

and limesurvey is ok with it?
Cool! Again thanks for the hint :)

DenisChenu

DenisChenu

2013-10-07 12:38

developer   ~26575

Last edited: 2021-11-25 10:00

Maybe we can do like that, but more like this:

redirect /mylilurl /index.php/survey/676767

Or that to in www.example.org
redirect /survey http://survey.example.org/index.php/survey/76767

Think your metho is OK too :)

mfaber

mfaber

2013-10-07 13:22

reporter   ~26577

Last edited: 2021-11-25 10:00

Hmmm...I'll leave this one open because it would be nice to have control over the url via LS interface.
But because of your solution it now has a very, very....very low priority :)
Thanks again,
M

tpartner

tpartner

2013-10-08 15:56

partner   ~26630

Last edited: 2021-11-25 10:00

"+1 for a user selectable short url" - I agree.

I would also like to see the capability of assigning an "alias" for the survey.

I also currently use .htaccess redirects but it's just one more level of complexity.

jonsen

jonsen

2014-05-27 23:26

reporter   ~30026

Last edited: 2021-11-25 10:00

This would be great to have as a feature. Of course, manually redirecting is okay too, but requires a system administrator to set up. Native support in LimeSurvey would be really handy.

Example survey "Opinion Survey 2014-1" with the alias "opinion":

OLD:
https://example.org/lime/index.php/survey/index/sid/12345/token/test1234/lang/en

NEW:
https://example.org/survey/opinion/test1234/en
or without an alias:
https://example.org/survey/12345/test1234/en

jonsen

jonsen

2014-05-27 23:41

reporter   ~30027

Last edited: 2021-11-25 10:00

Duplicate? http://bugs.limesurvey.org/view.php?id=5621

DenisChenu

DenisChenu

2014-06-23 13:02

developer   ~30207

Last edited: 2021-11-25 10:00

@jonsen : not really duplicate, i think .

The other
/sid/12345/token/test1234/lang/en : /shoturl

This one:
/sid/12345/token/test1234/lang/en : /shoturl/token/test1234/lang/en

Mazi

Mazi

2014-06-24 10:41

updater   ~30221

Last edited: 2021-11-25 10:00

+1 for short URLs!

DenisChenu

DenisChenu

2014-06-26 08:16

developer   ~30231

Last edited: 2021-11-25 10:00

Think short url can be only for surveyid OR surveyid + lang.

Not for token and/or for newtest.

LouisGac

LouisGac

2018-05-16 12:49

developer   ~47627

Last edited: 2021-11-25 10:00

well... the frontend url is analyzed by procedural code ( in controller/survey/index.php and in SurveyRuntimeHelper)
so it should not be that hard to do.

DenisChenu

DenisChenu

2018-08-31 17:05

developer   ~48926

Last edited: 2021-11-25 10:00

I think it can be done currently with a beforeControllerAction event if beforeControllerAction happened before 404 …

Because by default /mysurvey send a 404 …

@LouisGac : i'm OK with you, not an easy task, but not needed in frontend helper if you use a redirect.

TonisOrmisson

TonisOrmisson

2018-09-03 09:49

developer   ~48932

Last edited: 2021-11-25 10:00

+1
I even once started looking at how to implement this

markusd1984

markusd1984

2019-02-28 11:23

reporter   ~50701

Last edited: 2021-11-25 10:00

+1 for an option of short URLs in place of surveyid's, which probably would benefit a lot of users :)

Since I have only english as the language I have removed the language parameter manually in surveySummary_view.php and with having ShowScriptName disabled my survey urls only include the survey ID, which is already a lot better then the default. But short urls look better in emails and of course can be easier remembered when promoting verbally :)

I think though redirects would be better used for the original url (with sid) / previous changed short urls, so the survey remains reachable that way but the current short url remains visible in the browser address bar when visited.

btw. I think this is a duplicate of https://bugs.limesurvey.org/view.php?id=7538

DenisChenu

DenisChenu

2019-02-28 14:13

developer   ~50702

Last edited: 2021-11-25 10:00

For plugin : beforeControllerAction : since controller/action are done like this
r=controller/action : get the controller : test if in little url DB, if yes : redirect.

Can be done in plugin.
Without rewrite mode : you need /index.php?r=litleurl

Indispirit

Indispirit

2019-09-16 11:18

reporter   ~53581

Last edited: 2021-11-25 10:00

Plus one from me, providing surveys to schools and medical institutions so shorter in all cases is better. Many reasons, one being firewalls love breaking long urls in emails and not all users are aware of how to fix them.

Mazi

Mazi

2019-09-16 11:38

updater   ~53582

Last edited: 2021-11-25 10:00

@c_schmitz/@f_funke, this is a good example of a feature which would benefit from a better feature tracker. Not only allowing users to vote would be helpful but also checking for duplicates (see relationships added to this ticket).

cdalexndr

cdalexndr

2020-03-15 13:37

reporter   ~56555

Last edited: 2021-11-25 10:00

A simple fix for this would be:
If survey title is unique, create url from title instead of survey id.
Else, create url from id.

I guess users don't usually make surveys with same titles as they are ambiguous, so this fix will match many use cases.

cdalexndr

cdalexndr

2020-03-15 14:08

reporter   ~56556

Last edited: 2021-11-25 10:00

2 years since last comment from assigned person LouisGac.
Any update on this? Shouldn't be unassigned if no one is working on this?

Mazi

Mazi

2020-03-16 21:43

updater   ~56583

Last edited: 2021-11-25 10:00

I like the idea of using the survey title. It is very similar to how Wordpress creates SEO friendly page URLs.

@cdorin, is there a list of feature for future Limesurvey 4.x features? This would be worth adding.

TonisOrmisson

TonisOrmisson

2020-03-17 08:38

developer   ~56588

Last edited: 2021-11-25 10:00

I suggest having a separate field. Mostly because for administration purposes the name often contains some technical info eg. date references, project numbers, client names etc that you might not want visible or what is simply irrelevant. It should be a unique url-friendly (no spaces etc) value that would use SID by default or some other defined value.

DenisChenu

DenisChenu

2020-03-17 09:00

developer   ~56589

Last edited: 2021-11-25 10:00

I suggest to do it on an external way ...

Think beforeControlleraction can be used , need mod_rewrite or similar

tpartner

tpartner

2022-02-01 14:23

partner   ~68166

I would agree with Tonis' suggestion to have a separate field. This would allow shortening the survey name (if that is what you want to use).

Two additional "wishes" that may or may not be possible:

1) Localize the field so you can send "understandable" URLs in different languages.

2) Add a parameter to switch automatically triggering newtest=Y.

gabrieljenik

gabrieljenik

2022-02-01 15:36

manager   ~68171

2) Add a parameter to switch automatically triggering newtest=Y.

What do you mean @tpartner?
Can you ellaborate more?

DenisChenu

DenisChenu

2022-02-01 16:17

developer   ~68172

2) Add a parameter to switch automatically triggering newtest=Y.

You can not for newtest=Y in rewrite : only in redirect.

Looking at code : seems /mylilurl call directly survey/index controller. If you add newtest=Y : /mylilurl start again and again and again the survey.

gabrieljenik

gabrieljenik

2022-04-28 21:36

manager   ~69294

PR: https://github.com/LimeSurvey/LimeSurvey/pull/2218

gabrieljenik

gabrieljenik

2022-12-15 13:54

manager   ~73128

Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=34144

tpartner

tpartner

2022-12-15 14:07

partner   ~73130

Is there documentation?

gabrieljenik

gabrieljenik

2022-12-15 14:09

manager   ~73131

Nice catch :)

Mazi

Mazi

2022-12-15 14:22

updater   ~73133

Is this going to be available at the next 5.x version?

Please share documentation link later. I am curious to see how the setup is done.
Can you provide a sample URL for testing?

gabrieljenik

gabrieljenik

2022-12-15 14:47

manager   ~73137

Hi All!

Setup is pretty simple: From the Survey Settings, you just set the alias (short url) for each survey and language.

gabrieljenik

gabrieljenik

2022-12-26 18:24

manager   ~73311

Manual Updated: https://manual.limesurvey.org/Text_elements#Survey_Alias_.28New_in_5.5_.29

DenisChenu

DenisChenu

2023-05-17 12:18

developer   ~75023

Issue for publicurl : https://bugs.limesurvey.org/view.php?id=18821

Need option in https://github.com/LimeSurvey/LimeSurvey/commit/0b5acab20cb24b7e31d185dfd04cbedbcac803ff#diff-0268c3e4648700cef058f99725fd5364a285bd35701d30cfda885a81ce1c86a4R2306

Related Changesets

LimeSurvey: master 0b5acab2

2022-11-08 13:19:17

gabrieljenik


Committer: GitHub Details Diff
New feature 08239: Allow for user friendly survey URLS (#2218) Affected Issues
08239
mod - application/config/version.php Diff File
mod - application/controllers/LimereplacementfieldsController.php Diff File
mod - application/controllers/SurveyAdministrationController.php Diff File
mod - application/controllers/admin/Database.php Diff File
mod - application/controllers/admin/ExpressionValidate.php Diff File
mod - application/core/LSYii_Application.php Diff File
mod - application/core/LSYii_Controller.php Diff File
add - application/core/LSYii_ShortUrlValidator.php Diff File
mod - application/core/LimeMailer.php Diff File
add - application/helpers/update/updates/Update_494.php Diff File
mod - application/models/Survey.php Diff File
mod - application/models/SurveyLanguageSetting.php Diff File
mod - application/views/admin/survey/editLocalSettings_view.php Diff File
mod - application/views/admin/survey/subview/surveydashboard/001-sharingpanel.twig Diff File
mod - installer/create-database.php Diff File
add - tests/data/surveys/limesurvey_survey_shortUrlOpen.lss Diff File
add - tests/data/surveys/survey_archive_shortUrlClosed.lsa Diff File
add - tests/functional/frontend/ShortUrlTest.php Diff File

Issue History

Date Modified Username Field Change
2013-10-05 13:23 mfaber New Issue
2013-10-07 09:31 DenisChenu Note Added: 26567
2013-10-07 09:31 DenisChenu Severity @50@ => feature
2013-10-07 10:43 mfaber Note Added: 26568
2013-10-07 10:44 DenisChenu Note Added: 26569
2013-10-07 12:35 mfaber Note Added: 26574
2013-10-07 12:38 DenisChenu Note Added: 26575
2013-10-07 13:22 mfaber Note Added: 26577
2013-10-08 15:56 tpartner Note Added: 26630
2014-05-27 23:26 jonsen Note Added: 30026
2014-05-27 23:41 jonsen Note Added: 30027
2014-06-23 12:59 DenisChenu Relationship added parent of 09111
2014-06-23 12:59 DenisChenu Relationship deleted parent of 09111
2014-06-23 12:59 DenisChenu Relationship added child of 09111
2014-06-23 13:02 DenisChenu Note Added: 30207
2014-06-23 13:02 DenisChenu Note Edited: 30207
2014-06-24 10:41 Mazi Note Added: 30221
2014-06-26 08:16 DenisChenu Note Added: 30231
2015-11-09 18:44 DenisChenu Relationship added has duplicate 07834
2018-04-26 00:08 guest Note Added: 47523
2018-04-26 00:23 guest Note Added: 47524
2018-04-26 02:30 guest Note Added: 47525
2018-04-26 02:55 guest Note Added: 47526
2018-04-26 03:22 guest Note Added: 47527
2018-04-26 05:03 guest Note Added: 47528
2018-04-26 05:24 guest Note Added: 47529
2018-04-26 05:26 guest Note Added: 47530
2018-04-26 05:55 guest Note Added: 47531
2018-04-26 06:31 guest Note Added: 47532
2018-04-26 06:58 guest Note Added: 47533
2018-04-26 08:35 guest Note Added: 47534
2018-04-26 08:36 guest Note Added: 47535
2018-04-26 08:45 guest Note Added: 47536
2018-04-26 09:52 guest Note Added: 47539
2018-04-26 10:12 guest Note Added: 47540
2018-05-16 12:49 LouisGac Note Added: 47627
2018-05-16 12:49 LouisGac Assigned To => LouisGac
2018-05-16 12:49 LouisGac Status new => assigned
2018-08-31 16:36 jelo Relationship added related to 13836
2018-08-31 17:05 DenisChenu Note Added: 48926
2018-09-03 09:49 TonisOrmisson Note Added: 48932
2019-02-28 11:23 markusd1984 Note Added: 50701
2019-02-28 11:23 markusd1984 Issue Monitored: markusd1984
2019-02-28 14:13 DenisChenu Note Added: 50702
2019-09-16 11:18 Indispirit Note Added: 53581
2019-09-16 11:38 Mazi Note Added: 53582
2020-03-15 13:37 cdalexndr Note Added: 56555
2020-03-15 13:37 cdalexndr Issue Monitored: cdalexndr
2020-03-15 14:08 cdalexndr Note Added: 56556
2020-03-15 20:22 DenisChenu Assigned To LouisGac =>
2020-03-15 20:23 DenisChenu Status assigned => new
2020-03-16 21:43 Mazi Note Added: 56583
2020-03-17 08:38 TonisOrmisson Note Added: 56588
2020-03-17 09:00 DenisChenu Note Added: 56589
2020-03-17 09:24 c_schmitz Tag Attached: roadmap2020
2021-11-25 10:00 galads Zoho Project Synchronization => |Yes|
2021-11-25 10:00 LimeBot Zoho Projects ID => 85781000001460013
2021-11-25 10:00 LimeBot Zoho Projects URL => https://projects.limesurvey.org/portal/limesurvey#taskdetail/85781000001335039/85781000001348001/85781000001460013
2021-11-25 10:00 galads Assigned To => galads
2021-11-25 10:00 galads Status new => assigned
2021-11-25 11:53 guest Bug heat 30 => 36
2022-02-01 13:47 galads Assigned To galads => gabrieljenik
2022-02-01 13:47 galads Zoho Project Synchronization Yes => |Yes|
2022-02-01 14:23 tpartner Note Added: 68166
2022-02-01 15:36 gabrieljenik Note Added: 68171
2022-02-01 15:36 gabrieljenik Bug heat 36 => 38
2022-02-01 16:17 DenisChenu Note Added: 68172
2022-04-28 21:34 gabrieljenik Status assigned => ready for testing
2022-04-28 21:36 gabrieljenik Note Added: 69294
2022-11-06 15:15 temond Issue Monitored: temond
2022-11-06 15:15 temond Bug heat 38 => 40
2022-12-15 13:54 gabrieljenik Changeset attached => LimeSurvey master 0b5acab2
2022-12-15 13:54 gabrieljenik Note Added: 73128
2022-12-15 13:54 gabrieljenik Resolution open => fixed
2022-12-15 14:07 tpartner Note Added: 73130
2022-12-15 14:09 gabrieljenik Note Added: 73131
2022-12-15 14:22 Mazi Note Added: 73133
2022-12-15 14:47 gabrieljenik Note Added: 73137
2022-12-26 18:24 gabrieljenik Note Added: 73311
2023-05-17 12:17 DenisChenu Relationship added parent of 18821
2023-05-17 12:18 DenisChenu Note Added: 75023