Error with JQuery UI dialog in publish mode in Adobe EM 6.1 | Community
Skip to main content
Level 2
March 30, 2016

Error with JQuery UI dialog in publish mode in Adobe EM 6.1

  • March 30, 2016
  • 3 replies
  • 2404 views

Hi all,

I've created a dialog in javascript using jquery UI and although it's working correctly in author mode when I publish my web I got the error:

Uncaught TypeError: $(...).html(...).dialog is not a function

I have checked the Network tab in my browser when the page is loaded and I can see the library Jquery-UI is loaded:

Any idea? I don't know what else I can check.

Thanks in advance for your help!

Best regards.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

3 replies

Lokesh_Shivalingaiah
Level 10
March 30, 2016

Component Dialog would be created to use in 'Author' instance only. Only the content will be able to access in Publish instance.

How are you accessing it in publish instance !!

Level 2
March 30, 2016

It's not an adobe component dialog. It's a jquery dialog that I've created to simulate an alert message in my web. Similar to the following one:

Sorry, but I'm new working with Adobe... Is it not possible to use this in publish mode? 

Thanks!

Lokesh_Shivalingaiah
Level 10
March 30, 2016

that should be working !

Please make sure the required JQuery version is available. It looks like, the JQuery version which is available doesnt support one of the function used in your dialog.

kautuk_sahni
Community Manager
Community Manager
March 30, 2016

Adding to what Lokesh has said, be sure:

1. insert full version of jQuery UI. Also you should init the dialog first. Link:- http://stackoverflow.com/questions/26016562/error-typeerror-dialog-is-not-a-function

2. You have a couple of jQuery libraries being loaded on the same page (different versions of the same thing), which is wrong, unless you really need to keep old plugins working that depend on previous versions. In this specific case you would need to work out the conflicts. Make sure apt version is there. Link:- http://stackoverflow.com/questions/19442929/typeerror-dialog-is-not-a-function-error

 

I hope this helps.

Thanks and Regards

Kautuk Sahni

Kautuk Sahni
Level 2
March 30, 2016

Thanks for answering me. These are the steps I followed:

1) I have tried with the last jquery UI version. I've used both the jquery - min version and the full version. They're working in author mode but NOT in publish mode

2) I checked the dialog.js is loaded when page is loaded and it's there:

3) I've checked that there is no duplicated libraries. I'm using jquery and jquery-UI but they're different so this shouldn't be a problem and there is only a reference in my code to these libraries.

I'm stuck with that :( Any other suggestion please?

Thanks.

Level 3
July 19, 2016

Hi,

Were you able to resolve this issue?

I am getting the same error in page console, which is "$ is not a function". Code works in author but not in publish instance. I am also stuck here. :(

Level 3
June 14, 2017

Did you ever solve this?