Environment:
- ArcGIS Enterprise version: 12.1
- Experience Builder version: 1.20.0
- Browser/OS: Chrome
Summary:A custom widget registered as a remote resource (isRemote: true) on Portal works correctly while configuring an Experience, but after saving the Experience, the widget's context.isRemote flips to false and context.folderUrl becomes a malformed path containing the literal string undefined, instead of retaining the widget's original remote URL.
Steps to reproduce:
- Register a custom widget on Portal as an Experience Builder app/widget hosted on an external server
- Create a new Experience and drag the widget onto the canvas
- At this stage, inspecting this.props.context inside the widget shows:
{
"isRemote": true,
"folderUrl": "https://myserver/xwd/customwidget/"
}
- Save the Experience
- After saving (or reloading the published app), the same context shows:
{
"isRemote": false,
"folderUrl": "https://portalURL/apps/experiencebuilder/experience/../cdn/359/undefined"
}
Expected behavior:context.folderUrl should continue to point to the widget's original remote URL (or otherwise resolve to a valid, reachable path), both before and after saving the Experience.
Actual behavior:The widget attempts to load its own static resources (in our case, an iframe pointing to ${context.folderUrl}dist/runtime/assets/some.html) from an invalid URL:
https://portalURL/portal/apps/experiencebuilder/experience/../cdn/359/undefineddist/runtime/assets/some.html
resulting in a 404 error and the widget failing to render its content in the published app.
Impact:The custom widget is non-functional in the published production app, while working correctly during Builder configuration/preview.
This bug impact the favicon too so the result is no icon for the widget.
Relevant code (excerpt):
<iframe
id="myWidget"
src={`${this.props.context.folderUrl}dist/runtime/assets/some.html`}
width="100%"
height="90%"
/>