Knowledge Result Widget

djordjeg
Giga Contributor

I've  cloned Knowledge Result widget, and when I placed cloned instance on the Service portal page without any modifications, I started getting JavaScript error:  "Server JavaScript error "KBPortalService" is not defined." and it started prompting me to login into the portal although I am already logged in. It is exactly the same as the original.  

Any idea why is this happening?

Thank you,

Goran 

1 ACCEPTED SOLUTION

Hi Goran,

 

It is read only script include. We cannot modify it . Instead create a new custom script include and add the contents of this script include and in your custom widget add the custom script include. Please note , that the script include is calling KBPortalServiceImpl. 

 

Regards,

Swathi

View solution in original post

7 REPLIES 7

Swathi12
Tera Expert

Hi Goran,

 

The KBPortalService is a script include which is called in server script of the widget . Now this is scoped and available only for the application "Knowledge Management - Service Portal". When you cloned the widget it will be global and due to this you getting the error. 

 

You can edit the script include to be made available to all the application scopes.

 

Please do mark this answer helpful and correct if it answered your query and let me know in case of any queries.

 

Regards,

Swathi

djordjeg
Giga Contributor

Thanks Swathi.

I've tried changing script include accessibility from 'This application scope only' to "All Application scopes', but when I save it, it reverts back to 'This application scope only'. I have tried this few times and always reverts back. Any ideas? 

Thanks,

 

Goran

 

  

Hi Goran,

 

It is read only script include. We cannot modify it . Instead create a new custom script include and add the contents of this script include and in your custom widget add the custom script include. Please note , that the script include is calling KBPortalServiceImpl. 

 

Regards,

Swathi

Thank you Swathi. I had to copy angular templates as well.