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