Skip to content

PRESIDECMS-3236 export redirect to url - #1741

Open
qianqianlim wants to merge 4 commits into
pixl8:stablefrom
qianqianlim:feature-PRESIDECMS-3236_export_redirect_to_url
Open

PRESIDECMS-3236 export redirect to url#1741
qianqianlim wants to merge 4 commits into
pixl8:stablefrom
qianqianlim:feature-PRESIDECMS-3236_export_redirect_to_url

Conversation

@qianqianlim

@qianqianlim qianqianlim commented Feb 4, 2026

Copy link
Copy Markdown
Contributor

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 in renderers/content/Link.cfc to output getLinkUrl() for a link, and updates url_redirect_rule to include a computed redirect_to_url export 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.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread system/preside-objects/url_redirect_rule.cfc Outdated
Comment on lines +18 to +24
var link = getPresideObject( "link" ).selectData( id=args.data ?: "" );

if ( !link.recordCount ) {
return "Link not found";
}

return linksService.getLinkUrl( link.id );

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

admin renderer = none to hide it in the record detail's admin view

Image

@qianqianlim qianqianlim left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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;

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

admin renderer = none to hide it in the record detail's admin view

Image

Comment thread system/handlers/renderers/content/Link.cfc Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants