PRESIDECMS-3236 export redirect to url - #1741
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
This PR is being reviewed by Cursor Bugbot
Details
Your team is on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle for each member of your team.
To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.
| var link = getPresideObject( "link" ).selectData( id=args.data ?: "" ); | ||
|
|
||
| if ( !link.recordCount ) { | ||
| return "Link not found"; | ||
| } | ||
|
|
||
| return linksService.getLinkUrl( link.id ); |
There was a problem hiding this comment.
duplicate record exists check since the in the getLinkUrl already check that, and there is a helper for getLinkUrl could make use of it
| property name="keep_query_string" type="boolean" dbtype="boolean" required=false default=false; | ||
|
|
||
| property name="redirect_to_link" relationship="many-to-one" relatedto="link" required=true; | ||
| property name="rendered_redirect_link" type="string" dbtype="text" formula="${prefix}redirect_to_link" adminRenderer="none" dataExportRenderer="Link" searchSearchable=false autofilter=false; |
There was a problem hiding this comment.
since it is a formula field, dbtype won't required to defined as well as 'searchSearchable' shouldn't be here.
wondering the reason behind set the admin renderer to none as well.
(and I think redirect_to_url might be more suitable for the data rendered?)
qianqianlim
left a comment
There was a problem hiding this comment.
updated accordingly
| property name="keep_query_string" type="boolean" dbtype="boolean" required=false default=false; | ||
|
|
||
| property name="redirect_to_link" relationship="many-to-one" relatedto="link" required=true; | ||
| property name="rendered_redirect_link" type="string" dbtype="text" formula="${prefix}redirect_to_link" adminRenderer="none" dataExportRenderer="Link" searchSearchable=false autofilter=false; |

Note
Low Risk
Low risk: changes are limited to data export rendering and metadata/i18n, with no impact on redirect matching or runtime request handling.
Overview
Adds support for exporting the resolved target URL for redirect rules.
This introduces a
dataExport()renderer inrenderers/content/Link.cfcto outputgetLinkUrl()for a link, and updatesurl_redirect_ruleto include a computedredirect_to_urlexport field (hidden in admin) plus a matching i18n label.Written by Cursor Bugbot for commit fe39de2. This will update automatically on new commits. Configure here.