AnsweredAssumed Answered

Custom widget config problems

Question asked by tligon on Dec 16, 2016
Latest reply on Dec 16, 2016 by rscheitlin

I have a custom widget where I wanted to use its config file to hold a URL for a help page. Using the example from the "Make widget configurable" page, I put the URL in the widget's config.json file. In the widget's HTML template, I embed the URL in an anchor tag using ${config.helpUrl}. When the widget is opened in the application, a widget error occurred because the JSON couldn't be read in. I then edited the widget's config entries in the widgets-manifest and widgets-manifest-builder files to read "hasConfig: true".  After that change, the widget loaded, the URL was embedded, and the help file opened upon a click of the icon in the HTML template.


Here's the problem (finally): when the widget is loaded into a new application through the Web App Builder, the configuration page displays but never resolves. The console error is "ace is not defined"; the error occurs in builder/main.js at line 888 (app is on an intranet, so I can't post the stack trace). I can click the "OK" button and the widget is added to the app, but I don't want to have to add a caveat to our documentation that says "click OK on the config page".

Are my config files configured incorrectly?