Hi, I've come across an issue where my JS scripts loaded in the <head> are different in sequence between the pages. There is a page where the JS scripts sequence is loaded differently and hence a JS error is thrown (Uncaught TypeError: $.widget.extend is not a function from jQueryUI) and breaking all the other JS functions on the page.

Have anyone come across this and how would we be able to define and standardise the JS script loading sequence across the pages? Thanks

Hi MawShin,

I never came across this problem, can you share your oml or create a small oml that reproduces the error?

Regards,

Daniel

MawShin wrote:

Hi, I've come across an issue where my JS scripts loaded in the <head> are different in sequence between the pages. There is a page where the JS scripts sequence is loaded differently and hence a JS error is thrown (Uncaught TypeError: $.widget.extend is not a function from jQueryUI) and breaking all the other JS functions on the page.

Have anyone come across this and how would we be able to define and standardise the JS script loading sequence across the pages? Thanks

 Hi MawShin,

You can check the browser view source and check what sequence is being created in your script.

 

Daniël Kuhlmann wrote:

Hi MawShin,

I never came across this problem, can you share your oml or create a small oml that reproduces the error?

Regards,

Daniel

 

 Hi Daniel,


I'm unable to replicate this outside the environment. basically there is a a library used from Forge: https://www.outsystems.com/forge/component-overview/200/multiple-file-upload


We did some customisation to it with a wrapper web block. And for this web block that is used on a page with editable table component, the File upload JS files seem to be loaded before the RichWidget jQuery UI js and this cause a JS error being thrown as jQueryUI isn't found when file upload JS starts to run.


So I'm wondering is it because the fileupload web block has been nested a few levels so when it is used on a page, the deepest level which contain the JS scripts get loaded up front even before the script before RichWidget.


Thanks

Maw