Why am I getting link is not a function in service portal?

Sushma R1
Tera Expert

Hi Folks,

Does anybody have got this error in console while debugging even when we are not using link function in WIDGETS service portal?

Any leads would be really helpful and appreciated ?

Much thanks in advance!!

Sushma

link isnot a function.PNG

1 ACCEPTED SOLUTION

kevinanderson
Giga Guru

I blame the missing boilerplate code for the link function in the widget record:



function(scope, element, attr, ctrl){


    /* place jQuery client side code here */



}



Capture_widget_link_function_boilerplate.PNG



I am really tired of having to parse the boilerplate code out of the video in the wiki doc:


Widget Editor CSS and Link Function


View solution in original post

5 REPLIES 5

larstange
Mega Sage

Could you share your code with us - espcially any part which contains the word "link"


Hi Lars,



Am neither using the link function in Service portal any widget nor have created a function in that name. But in each of my SP pages i'm getting link is not a function in console logs. Its not giving me any problem to run my pages, but I don't want any errors in my widgtes thats why. Can you please help me with it.?



Thanks,


Sushma


larstange
Mega Sage

Do you have a customized header in the portal.



Since the error is happening on every page, it could be happening in the header. You can also try and remove the header and access a page, to see if the error disappears.


kevinanderson
Giga Guru

I blame the missing boilerplate code for the link function in the widget record:



function(scope, element, attr, ctrl){


    /* place jQuery client side code here */



}



Capture_widget_link_function_boilerplate.PNG



I am really tired of having to parse the boilerplate code out of the video in the wiki doc:


Widget Editor CSS and Link Function