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

TOPIC: How can I embed {TOKEN} in a URL?

Re: How can I embed {TOKEN} in a URL? 2 years 8 months ago #70257

  • Mazi
  • Mazi's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 5324
  • Thank you received: 294
  • Karma: 248
Please test if the problem still exists at the latest release. If so please open a ticket at the bugtracker and...
  1. Give as much information as possible
  2. Attach your survey. You can mark your ticket "private" so that only the developers will be able to take a look at it.
  3. Provide step-by-step instructions how to reproduce the problem.
  4. If possible/helpful please provide screenshots

Afterwards please post the link to the bugtracker so we can follow the progress.

Thanks!

Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)limesurvey.org'"
The administrator has disabled public write access.

Re: How can I embed {TOKEN} in a URL? 2 years 8 months ago #70275

  • atiut
  • atiut's Avatar
  • OFFLINE
  • Senior Lime
  • Posts: 76
  • Thank you received: 2
  • Karma: 1
It would seem that I have over-generalised and placeholders in links do work... sometimes. I have put here: bugs.limesurvey.org/view.php?id=5619 a bug report documenting how they fail to work at least for mailto links

Thanks Mazi for the instructions :)
The administrator has disabled public write access.

Re: How can I embed {TOKEN} in a URL? 2 years 8 months ago #70281

  • JEfromCanada
  • JEfromCanada's Avatar
  • OFFLINE
  • Junior Lime
  • Posts: 39
  • Thank you received: 3
  • Karma: 0
I'm not sure this problem is related to how the '{' character is interpreted.

When I first found that register.php was missing a replacement definition for the {TOKEN} symbol, I thought I had spotted the bug that caused my mailto url to be incorrectly formed. That's when I added the "patch". Since then, however, I located this snippet of code in module fck_LimeReplacementFields.php and it appears to have purposely avoided setting the {TOKEN} replacement :
 
    case 'email-inv':
    case 'email-rem':
        // these 2 fields are supported by email-inv and email-rem
        // but not email-reg for the moment
        $replFields[]=array('EMAIL',$clang->gT("Email from the token"));
        $replFields[]=array('TOKEN',$clang->gT("Token code for this participant"));
    case 'email-reg':
        $replFields[]=array('FIRSTNAME',$clang->gT("Firstname from token"));
        $replFields[]=array('LASTNAME',$clang->gT("Lastname from token"));
        $replFields[]=array('SURVEYNAME',$clang->gT("Name of the survey"));
        $replFields[]=array('SURVEYDESCRIPTION',$clang->gT("Description of the survey"));
        $attributes=GetTokenFieldsAndNames($surveyid,true);
        foreach ($attributes as $attributefield=>$attributedescription)
        {
            $replFields[]=array(strtoupper($attributefield), sprintf($clang->gT("Token attribute: %s"),$attributedescription));
        }
        $replFields[]=array('ADMINNAME',$clang->gT("Name of the survey administrator"));
        $replFields[]=array('ADMINEMAIL',$clang->gT("Email address of the survey administrator"));
        $replFields[]=array('SURVEYURL',$clang->gT("URL of the survey"));
        $replFields[]=array('EXPIRY',$clang->gT("Survey expiration date (YYYY-MM-DD)"));
        $replFields[]=array('EXPIRY-DMY',$clang->gT("Survey expiration date (DD-MM-YYYY)"));
        $replFields[]=array('EXPIRY-MDY',$clang->gT("Survey expiration date (MM-DD-YYYY)"));
        break;
 


From this, it appears clear that the replacement field "TOKEN" was not processed in register.php as a documented feature/shortcoming.

(by the way, the source code I have is from build 9432, so this may no longer be current).
The administrator has disabled public write access.

Re: How can I embed {TOKEN} in a URL? 2 years 8 months ago #70292

  • JEfromCanada
  • JEfromCanada's Avatar
  • OFFLINE
  • Junior Lime
  • Posts: 39
  • Thank you received: 3
  • Karma: 0
JEfromCanada wrote:
(by the way, the source code I have is from build 9432, so this may no longer be current).

I was wrong about the build number. It's actually 9642.
The administrator has disabled public write access.

Re: How can I embed {TOKEN} in a URL? 2 years 8 months ago #70321

  • Mazi
  • Mazi's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 5324
  • Thank you received: 294
  • Karma: 248
JEfromCanada, please share your finding at the bug ticket linked above, our developers don't hang around at the forum much.

Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)limesurvey.org'"
The administrator has disabled public write access.
  • Page:
  • 1
  • 2
Moderators: ITEd
Time to create page: 0.182 seconds
Donation Image