Error: "The custom link is invalid" when creating a custom link in the branding theme configuration
searchcancel
Error: "The custom link is invalid" when creating a custom link in the branding theme configuration
book
Article ID: 395442
calendar_today
Updated On: 05-01-2025
Products
VMware Cloud Director
Issue/Introduction
When attempting to add menu links, if the URL contains an underscore _ or $ symbol it will not be accepted.
Placeholder variables such as ${TENANT_NAME}. ${TENANT_ID and ${SESSION_TOKEN} cannot be set.
I receive the error message “The custom link is invalid” and the SAVE button becomes disabled and grayed out.
Environment
Cloud Director 10.6.x
Cloud Director 10.5.x
Cause
This issue occurs as the branding themes UI validation does not accept _ or $ symbols.
Resolution
To workaround the issue perform the following steps:
Login to the Provider UI and navigate to "Customize Portal -> Themes".
Create a theme using the "create theme" button or edit an existing theme by clicking the "Details" link on that theme.
Under "Links -> Menu -> Menu Items" click "link".
Create the custom links in the theme, but don't use the underscores or dollar variable characters for now. Just set something as a placeholder. e.g: https://example.com
Save the theme.
Click the "Export" button on the theme and save it to your desktop.
Extract the zip file.
Within the extracted directory, open the custom_links.json file with a text editor.
Modify the custom links within the "url" section and insert the variable desired.e.g ${TENANT_NAME}
Save the file.
Compress all the files again to zip format.
In Cloud Director Themes UI, click the "Import" button and upload the ZIP file.
Apply the newly uploaded Theme to the Org by selecting "Actions -> Assign".
Login to the Tenant Org UI and confirm the custom links have been applied successfully.