Import a knowledge base from static html files
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-27-2008 02:41 PM
We would like to import an existing KB article we have saved locally as an HTML file to the Service-Now server and create a new KB.
I was provided a script which is in the wiki (http://wiki.service-now.com/index.php?title=Useful_Scripts#Import_a_knowledge_base_from_static_html_files_.26_rename_all_image_tags). This script is supposed to enable uploading of HTML files(including images) to the KB.
My problem is,i can able to upload the file into the KB,but the images are not visible in the KB article
(The images within the articles are not uploading).If anyone else has had success with such an operation, please let us know.
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-22-2011 02:33 PM
Hi,
Thank you Marc for following up with this issue. We have been trying to utilize this aspect of the ITSM suite for a long time (over 3 years). We have a few questions regarding the process you described:
- When you say we will need to get some SNC resources, does that mean technical support or professional services?
- Could you please clarify what you mean when you say we need SNC OPS access?
- Regarding the " /scs/" folder - is that a folder we need to create on a local machine from which we will be uploading the files or is this a folder we need to create on an SNC server?
- When we ran the scheduled job to upload the files, as described in your most recent post, we encountered the following error within the sys log:
org.mozilla.javascript.EcmaError: [JavaPackage java.io.FileReader] is not a function.
Caused by error in at line 36
33: return;
34: if (!file.isFile())
35: return;
==> 36: var fileReader = new java.io.FileReader(file);
37: var reader = new java.io.BufferedReader(fileReader);
38: var l = null;
39: var total = "";
Might you be able to determine the cause of this error?
The tool you referenced is very helpful!
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-22-2011 08:07 PM
I think I can address at least a couple of these, tho not the rest.
"SNC resources" almost surely means Professional Services, since this isn't something with which Customer Support has experience, and isn't something that can yet be officially supported.
"new java.io.FileReader" used to work but doesn't anymore. Java classes must be called with Packages call, e.g., "new Packages.java.io.FileReader", but I'm not sure we even allow access to java.io classes anymore.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-25-2011 02:11 AM
- When you say we will need to get some SNC resources, does that mean technical support or professional services?
Yes, when I was saying SNC Resources, I did mean someone from Services, (which in this case was myself)
- Could you please clarify what you mean when you say we need SNC OPS access?
(Because only OPS have access to the back-end databases, I had to have those images uploaded to an /uploads folder which lives on every instance, you could do this manually through the UI but if you have a lot of images, that would be very time-consuming'
- Regarding the " /scs/" folder - is that a folder we need to create on a local machine from which we will be uploading the files or is this a folder we need to create on an SNC server?
'The /scs/ folder is already on an instance, it's more of a shortcut to the 'uploads' folder rather than an actual folder, but if your html filters reference /scs then any images uploaded to the 'uploads' folder will work.
- When we ran the scheduled job to upload the files, as described in your most recent post, we encountered the following error within the sys log:
As James says, those commands will no longer work on newer instances, that's why I had to import the KB articles to an older instance, then export them via XML.
thanks,
Marc
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-25-2011 07:34 AM
Is there any purpose in leaving the Import to the Knowledge Base script up? Since the java.io.File command was locked down, it seems like a useless script for customers.
Yours,
Guy Yedwab
Documentation
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-25-2011 11:35 AM
Regarding the scheduled job, are you saying this procedure will not work on a newer version? Would we need to perform part of the procedure on an old instance, then complete on a new instance? (as you described)