Youtrack custom widget failing
We are self-hosting YouTrack and I am following the documentation to create a custom widget. I have been able to successfully test the widget in the widget playground. When i upload the custom widget as a zip file it successfully uploads, however when i add the widget to my dashboard the widget does not render. I can see in the network tab that the request for the widget javascript is being sent to https://<my_domain>/index.js however i note that other widgets are sending the request to https://my_domain/hub/api/rest/widgets/quick-notes/archive/main-24f8fae6a61132a6c664.js
how can i get the widget to render?
my zip file has the following structure
./dist
├── manifest.json
├── index.html
├── index.js
└── index.css
here is my manifest.json
{
"key": "milestone-widget",
"version": "1.0.7",
"name": "Milestone widget",
"description": "An issue widget that includes milestone due date",
"author": "SK",
"applicationName": "YouTrack",
"products": {
"Hub": ">=2024.2.37269",
"YouTrack": ">=2024.2.37269"
},
"view": {
"fadeOut": true,
"defaultWidth": 3,
"defaultHeight": 2
},
"capabilities": {
"popups": true,
"topNavigation": true
}
}
Please sign in to leave a comment.
Hi,
I'm Sergey from the YouTrack team.
I've already replied to your support ticket and am now posting it here just in case.
As widgets are not hosted on the root path, please remove the leading slashes from the resource paths:
src="/index.js"
->src="index.js"
in your index.html. Then reupload the widget and check if it works.