cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1177
Views
0
Helpful
10
Replies

Gadget Not Initializing

devhl
Level 1
Level 1

I got the Click to Call gadget to work on the sandbox 11.5 without many issues.  Now at work I'm trying to push out the 10.6 version, but the gadget will not initialize.  It renders, and it prints out my console.log message right before the init function is called, but in the JS file none of my log messages get printed, nor are there any errors.  When I click the button, it says cannot read property makeCall of undefined.  How can I get init to run?

1 Accepted Solution

Accepted Solutions

I've figured it out, and I feel kind of dumb over it.  I had a / in the src attribute for the JavaScript.  There was an error, but not in the console.  It was in the concat object inside the Sources tab.  The error was buried inside of a long comment.  I only found it because I searched the file for my namespace, and the JS file happens to have the same name.  Thanks for all the help.

View solution in original post

10 Replies 10

dekwan
Cisco Employee
Cisco Employee

Hi,

 

Version 10.6 and 11.5 gadgets are not compatible with each other. You have to make some code changes to make it work. Here is a wiki that explains from 10.5-> 10.6/11.0/11.5: https://community.cisco.com/t5/collaboration-blogs/how-to-convert-your-existing-10-5-1-custom-gadget-to-work-with/ba-p/3657841 You can reverse the steps to go from 11.5 -> 10.6.

 

Thanx,

Denise

Thanks for the reply.  I will look at that.  I wasn't trying to use the 11.0 versions on 10.5.  There is no 10.5 sandbox, so I had to work with the oldest one available for testing.  Once I got it working, I started with the 10.5 template and added the things I needed but it was not initializing.  

 

What I am trying now is I copied an existing working gadget in use on our server, stripped out basically everything, and just did a simple hello world print to console when the button is clicked.  If that works I'll be good to go.

dekwan
Cisco Employee
Cisco Employee

Hi,

 

I was under the impression that you got a 11.5 version of the gadget working and you are now trying to get it working for 10.6. Is that not correct?

 

Thanx,

Denise

I started with the sandbox and the clicktocall gadget on version 11.5.  I got that working.  This was just to test and learn how a gadget is made.

 

Then I moved to the 10.6 version of the clicktocall gadget and tried to run that on a 10.6 Finesse out of a sandbox.  The gadget shows up but it doesn't seem to initialize.  The only changes I'm making to the sample 10.6 gadget are adding buttons to the HTML and commenting out the .hide() lines, as I don't ever want them to just hide.

dekwan
Cisco Employee
Cisco Employee

Hi,

 

I don't have a 10.6 system to test it out myself. Where in the init is it getting stuck? I would suggest trying to put a breakpoint while using the browser's developer tools. Also, in 10.6, the finesse.js is hosted on the Finesse server. Are you able to load the finesse.js in the browser using the absolute url?

 

Thanx,

Denise

Yes I can load Finesse.js.

 

As far as I can tell, init isn't running at all.  I have a console.log message at the top of the file, and inside init, I have a clientLog.log to see if anything is running and I don't seen anything.  There are no errors until I click the button.  I tried breaking, but I wasn't sure how to break on init as that bit should have ran before I get a chance to set the break point.  

 

There is another gadget on the server that works, and I've done a simple hello world based off of that code.  If that works, I'll be good to go.  I'm just waiting on someone else to load it to the server.  Unfortunately, I don't manage the server, I'm just a user of Finesse with a bit of coding experience, so the troubleshooting is taking some time.

I've got the same result.  init doesn't seem to run.  I've got log messages all over the js and I'm not seeing any of them, even inside the init function.

dekwan
Cisco Employee
Cisco Employee

Hi both,

 

Can you attach your gadget files as well as stating which version of Finesse you are using? Also, make sure that you are not loading from cache by using the nocache option.

 

Thanx,

Denise

I've figured it out, and I feel kind of dumb over it.  I had a / in the src attribute for the JavaScript.  There was an error, but not in the console.  It was in the concat object inside the Sources tab.  The error was buried inside of a long comment.  I only found it because I searched the file for my namespace, and the JS file happens to have the same name.  Thanks for all the help.

dekwan
Cisco Employee
Cisco Employee

Glad you were able to figure it out. Don't worry, it happens to the best of us. I've banged my head many times.

 

Thanx,

Denise

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: