ClientConfig setting not working in weblinks

I’m pretty sure this used to work when the site was in 2.8, now in 3.2.0 I have a field in ClientConfig containing a global URL. When I put that in a weblink, though, I get this error:

The weblink content “[[++client_donate_url]]” provided in Resource id 5936 is invalid.

Shouldn’t this work? If not, is there a way around it?

As far as I can tell, this should only affect the Preview of the weblink (button “View” in the manager). I think the weblink itself should still work.

With MODX version 3.2.0, some validity checks got added to weblink-resources. These might be too restrictive.

See this pull request for more information about the change:

Actually, that isn’t even working properly. If the URL entered into the client_donate_url field in Clientconfig is “https://externalwebsite.xyz”, and the weblink is set to [[++client_donate_url]], then the link that shows up in the site menu is “https://mywebsite.com/https://externalwebsite.xyz”. The site_url is getting prepended to the weblink, which shouldn’t happen. (use_weblink_target is set to “yes”.)

I tried to reproduce this issue, but wasn’t able to.

On a fresh installation of MODX 3.2.0-pl with ClientConfig 2.5.0-pl (and “use_weblink_target” = Yes) I created a new weblink with [[++client_donate_url]] as the value.
When I use a link tag ([[~...]]) to this weblink on another page, I get the correct output → https://externalwebsite.xyz.

How do you generate the site menu?

Yes, links embedded in pages work. But weblinks in the menus did not.

The custom script that creates the menus was looking for a class_key value of “modWebLink“ to do something specific with those. In MODX 3, the value is “MODX\Revolution\modWebLink”. I updated the script, and the menus are correct now.