REDCap URL durability

123 views
Skip to first unread message

Tom Maloney

unread,
Nov 13, 2023, 1:16:00 PM11/13/23
to redcap open
Hello Experts,

Our site users love it when we provide URL links to directly open a particular form on a subject record.

However, REDCap embeds the current version system ID in its URLs, breaking PAST links by obsoleting that portion of the URL.

Is there some workaround that would have REDCap produce a permanent durable URL that does not include, or aliases the current version inside the string?

Thanks!
-Tom

Rick Watts

unread,
Nov 13, 2023, 1:43:38 PM11/13/23
to Tom Maloney, redcap open
The breaking of those links actually depends on how your system is managed. If the older version files still exist on the server then REDCap will redirect to the latest version. However, some older versions represent security risks and most administrators remove all but a few past releases. To the best of my knowledge there is currently no way around this.
Rick Watts

Team Lead, Research Informatics

rick....@ualberta.ca

Women and Children’s Health Research Institute

University of Alberta

5-083 Edmonton Clinic Health Academy (ECHA)

11405 87 Avenue NW Edmonton, AB T6G 1C9

F:  (780) 248-5616




WCHRI is a partnership between the University of Alberta and Alberta Health Services, funded by the generosity of the Stollery Children's Hospital Foundation and the Alberta Women’s Health Foundation.


The University of Alberta respectfully acknowledges that we are situated on Treaty 6 territory, traditional lands of First Nations and Métis people.


 



--
You received this message because you are subscribed to the Google Groups "redcap open" group.
To unsubscribe from this group and stop receiving emails from it, send an email to redcap_open...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/redcap_open/CANCyrohv0AMTpUup4CWK2%3D8xp__cr7Uk39cRHxzAbEYefOpy6g%40mail.gmail.com.

Tom Maloney

unread,
Nov 13, 2023, 3:23:57 PM11/13/23
to Rick Watts, redcap open
Sigh. Does anyone know if the developers are working on a ' Miscellaneous ' Smart Variable like [redcap-version-url-current] that behaves more like the non-version-specific [survey-base-url]?
I imagine that the local admin could work with their ITS DNS management counterparts to provide an alias outside of REDCap's internals, and make updating it part of the upgrade workflow.

Thanks for the very quick reply, Rick!
-Tom

Luke Stevens

unread,
Nov 13, 2023, 3:34:42 PM11/13/23
to Tom Maloney, Rick Watts, redcap open

Hello Tom,

 

In general, the solution is as easy as just not removing old version directories unless advised by Vanderbilt due to specific security vulnerabilities. And yes, there are smart variables that return the current version ([redcap-version], e.g. 13.10.6) and current version URL ([redcap-version-url], e.g. http://redcap.ourplace.edu/redcap_v13.10.6/)

 

There are also some server-side options around URL rewriting. See https://redcap.vanderbilt.edu/community/post.php?id=73262

 

HTH,

Luke

Luke Stevens
Research Data Systems Manager
Clinical Epidemiology & Biostatistics Unit (CEBU)
Murdoch Children's Research Institute
The Royal Children's Hospital, 50 Flemington Road
Parkville, Victoria 3052 Australia
T   +61 3 9345 6552
E   luke.s...@mcri.edu.au
W  mcri.edu.au

 

 

 

 

From: redca...@googlegroups.com <redca...@googlegroups.com> On Behalf Of Tom Maloney
Sent: Tuesday, November 14, 2023 7:24 AM
To: Rick Watts <rick....@ualberta.ca>
Cc: redcap open <redca...@googlegroups.com>
Subject: [EXTERNAL]Re: REDCap URL durability

 

CAUTION:  External Email. Please be cautious with attachments and clicking links

 

Sigh. Does anyone know if the developers are working on a ' Miscellaneous ' Smart Variable like [redcap-version-url-current] that behaves more like the non-version-specific [survey-base-url]?

I imagine that the local admin could work with their ITS DNS management counterparts to provide an alias outside of REDCap's internals, and make updating it part of the upgrade workflow.

 

Thanks for the very quick reply, Rick!

-Tom

 

On Mon, Nov 13, 2023 at 1:43 PM Rick Watts <rick....@ualberta.ca> wrote:

The breaking of those links actually depends on how your system is managed. If the older version files still exist on the server then REDCap will redirect to the latest version. However, some older versions represent security risks and most administrators remove all but a few past releases. To the best of my knowledge there is currently no way around this.

Rick Watts

Team Lead, Research Informatics

rick....@ualberta.ca

Women and Children’s Health Research Institute

University of Alberta

5-083 Edmonton Clinic Health Academy (ECHA)

11405 87 Avenue NW Edmonton, AB T6G 1C9

F:  (780) 248-5616



Image removed by sender.



WCHRI is a partnership between the University of Alberta and Alberta Health Services, funded by the generosity of the Stollery Children's Hospital Foundation and the Alberta Women’s Health Foundation.



The University of Alberta respectfully acknowledges that we are situated on Treaty 6 territory, traditional lands of First Nations and Métis people.



Image removed by sender.Image removed by sender.Image removed by sender.Image removed by sender. Image removed by sender.

 

 

On Mon, Nov 13, 2023 at 11:16 AM Tom Maloney <malon...@gmail.com> wrote:

Hello Experts,

 

Our site users love it when we provide URL links to directly open a particular form on a subject record.

 

However, REDCap embeds the current version system ID in its URLs, breaking PAST links by obsoleting that portion of the URL.

 

Is there some workaround that would have REDCap produce a permanent durable URL that does not include, or aliases the current version inside the string?

 

Thanks!

-Tom

--
You received this message because you are subscribed to the Google Groups "redcap open" group.
To unsubscribe from this group and stop receiving emails from it, send an email to redcap_open...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/redcap_open/CANCyrohv0AMTpUup4CWK2%3D8xp__cr7Uk39cRHxzAbEYefOpy6g%40mail.gmail.com.

--
You received this message because you are subscribed to the Google Groups "redcap open" group.
To unsubscribe from this group and stop receiving emails from it, send an email to redcap_open...@googlegroups.com.



This e-mail and any attachments to it (the "Communication") are, unless otherwise stated, confidential, may contain copyright material and is for the use only of the intended recipient. If you receive the Communication in error, please notify the sender immediately by return e-mail, delete the Communication and the return e-mail, and do not read, copy, retransmit or otherwise deal with it. Any views expressed in the Communication are those of the individual sender only, unless expressly stated to be those of Murdoch Children’s Research Institute (MCRI) ABN 21 006 566 972 or any of its related entities. MCRI does not accept liability in connection with the integrity of or errors in the Communication, computer virus, data corruption, interference or delay arising from or in respect of the Communication.

Peter Macisaac (POP)

unread,
Nov 14, 2023, 4:12:14 PM11/14/23
to Luke Stevens, Tom Maloney, Rick Watts, redcap open
Thanks Luke,

So if generating URLs as a form of API (for example to create a record for a child based on information contained in a family record -( one usecase I have previously used) the use of the smart variable in url in place of the current version should address toms need, and not rely on back end server management processes beyond the control of the local REDCap community.

Have I interpreted this correctly?

Peter

On 14 Nov 2023, at 7:34 am, Luke Stevens <luke.s...@mcri.edu.au> wrote:

Hello Tom,
 
In general, the solution is as easy as just not removing old version directories unless advised by Vanderbilt due to specific security vulnerabilities. And yes, there are smart variables that return the current version ([redcap-version], e.g. 13.10.6) and current version URL ([redcap-version-url], e.g. http://redcap.ourplace.edu/redcap_v13.10.6/)
 
There are also some server-side options around URL rewriting. Seehttps://redcap.vanderbilt.edu/community/post.php?id=73262
Rick Watts


WCHRI is a partnership between the University of Alberta and Alberta Health Services, funded by the generosity of the Stollery Children's Hospital Foundation and the Alberta Women’s Health Foundation.


The University of Alberta respectfully acknowledges that we are situated on Treaty 6 territory, traditional lands of First Nations and Métis people.


 
On Mon, Nov 13, 2023 at 11:16 AM Tom Maloney <malon...@gmail.com> wrote:
Hello Experts, 
 
Our site users love it when we provide URL links to directly open a particular form on a subject record.
 
However, REDCap embeds the current version system ID in its URLs, breaking PAST links by obsoleting that portion of the URL.
 
Is there some workaround that would have REDCap produce a permanent durable URL that does not include, or aliases the current version inside the string?
 
Thanks!
-Tom
-- 
You received this message because you are subscribed to the Google Groups "redcap open" group.
To unsubscribe from this group and stop receiving emails from it, send an email toredcap_open...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/redcap_open/CANCyrohv0AMTpUup4CWK2%3D8xp__cr7Uk39cRHxzAbEYefOpy6g%40mail.gmail.com.
-- 
You received this message because you are subscribed to the Google Groups "redcap open" group.
To unsubscribe from this group and stop receiving emails from it, send an email toredcap_open...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/redcap_open/CANCyroh%2B%3D%2B2KMJksSYuotE9iK%2BHsFzgUrrDVa_nExaV5B5qvRg%40mail.gmail.com.


This e-mail and any attachments to it (the "Communication") are, unless otherwise stated, confidential, may contain copyright material and is for the use only of the intended recipient. If you receive the Communication in error, please notify the sender immediately by return e-mail, delete the Communication and the return e-mail, and do not read, copy, retransmit or otherwise deal with it. Any views expressed in the Communication are those of the individual sender only, unless expressly stated to be those of Murdoch Children’s Research Institute (MCRI) ABN 21 006 566 972 or any of its related entities. MCRI does not accept liability in connection with the integrity of or errors in the Communication, computer virus, data corruption, interference or delay arising from or in respect of the Communication.


-- 
You received this message because you are subscribed to the Google Groups "redcap open" group.
To unsubscribe from this group and stop receiving emails from it, send an email to redcap_open...@googlegroups.com.

Tom Maloney

unread,
Nov 14, 2023, 11:04:22 PM11/14/23
to Peter Macisaac (POP), Luke Stevens, Rick Watts, redcap open
Thanks for the thoughts, everyone. My use case is NOT for data collection. Rather, our group includes infrequent REDCap users who get frustrated navigating to records and forms we need them to review/comment on. We hit upon giving them the URL active for a particular record and form. They click on it, login, and have no searching to do at all- the case and form just open up for them to do their focused bit of work. They love it, and we love it because they love it.

However- with frequent REDCap version updates, the URLs some staff hang onto in anticipation of re-checking- just break when the mid-URL REDcap version ID changes. All their sad frustrations flood back.

I'm pursuing getting our DNS people to create a version-free alias as a base url. They can then update that alias when the redirected true URL changes with the next upgrade. Before I begin the chain of meetings to get that looked into, I am hoping to learn whether there is some easy internal-to-REDCap capability I should not overlook. It sounds like there is not.

Folks on this list are great- thanks for all the shared knowledge!
-Tom

Luke Stevens

unread,
Nov 16, 2023, 8:15:27 PM11/16/23
to Tom Maloney, Peter Macisaac (POP), Rick Watts, redcap open

Hello Tom,

 

If your IT group insist on removing old version directories and you get no luck with server-side redirection rules, but you really need version-free URLs for people, then you might make use of the REDCap functionality that works without the version number in the URL – surveys!

 

Set up a survey that you can pass the desired page parameters to using survey field prefilling, then the [redcap-version-url] smart variable to build a redirect link that will always incorporate the current version. Some examples below. You obviously won’t be able to log in and access the project in our server, but you will see the redirections occurring.

 

Project Home Page

https://redcap.mcri.edu.au/surveys/?s=JN3WR8EHL3EAPXRM&projectid=13810

Redirects to https://redcap.mcri.edu.au/redcap_v13.10.6/index.php?pid=13810

 

Record Status Dashboard

https://redcap.mcri.edu.au/surveys/?s=JN3WR8EHL3EAPXRM&projectid=13810&pagepath=DataEntry/record_status_dashboard.php

Redirects to https://redcap.mcri.edu.au/redcap_v13.10.6/DataEntry/record_status_dashboard.php?pid=13810

 

Add New (Autonumbered) Record (where first form is form_1)

https://redcap.mcri.edu.au/surveys/?s=JN3WR8EHL3EAPXRM&projectid=13810&pagepath=DataEntry/index.php&qs1=page=form_1&qs2=id=1&qs3=auto=1

Redirects to https://redcap.mcri.edu.au/redcap_v13.10.6/DataEntry/index.php?pid=13810&page=form_1&id=1&auto=1

 

Data Import Page

https://redcap.mcri.edu.au/surveys/?s=JN3WR8EHL3EAPXRM&projectid=13810&pagepath=index.php&qs1=route=DataImportController:index

Redirects to https://redcap.mcri.edu.au/redcap_v13.10.6/index.php?pid=13810&route=DataImportController:index

 

There is some JavaScript here that automates the actual redirect, but it’s not really necessary. The version-safe link-making and redirect on clicking the survey button works just fine without it. If you want to know, the code is injected using the REDCap JavaScript Injector external module.

 

$(document).ready(function() {

  setTimeout(

    function() {

      if ($('input[name=redirecturl]').val()!='') {

        $('div.spinner-border').css("visibility", "hidden");

        $('button[name=submit-btn-saverecord]').trigger('click');

      }

    }, 3000

  );

});

 

XML attached too.

 

I hope that helps.

VersionSafeRedirect_2023-11-17_1206.REDCap.xml
Reply all
Reply to author
Forward
0 new messages