- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-04-2019 12:47 PM
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
Solved! Go to Solution.
- Labels:
-
Service Portal Development
- 2,880 Views
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-07-2019 11:42 PM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-05-2019 07:24 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-05-2019 11:00 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-07-2019 11:42 PM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-10-2019 06:01 AM
Thank you Swathi. I had to copy angular templates as well.