Skip to content

use_weblink_target breaks weblink preview if target is ID or link tag #16195

@matdave

Description

@matdave

Bug report

Summary

When use_weblink_target is enabled, weblinks that use an ID or [[~ID]] format no longer work. Issue stems from the modContext class's makeUrl's handling of that variable.

Step to reproduce

Enable use_weblink_target in the system settings. Create a new Weblink with the ID of an existing resource. Save and Preview.

Observed behavior

The Weblink will take you to example.com/[[~ID]] or example.com/ID instead of the parsed link.

Expected behavior

It should work like standard weblinks and allow for the content to be parsed as a resource ID or dynamically created link.

Environment

Observed using 2.8.4 in MODX Cloud.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugThe issue in the code or project, which should be addressed.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions