Category Archives: ICN Known issues

This category summarizes all issues I found on the IBM Content Navigator, and when I can, gives a workaround or a fix.

Bug in resize of ecm.widget.FolderTree

I just noticed a bug in the FolderTree widget. It is setting its size based on the first ancestor widget, not parent dom node. That means if your FolderTree is in a div or anything not widget, it will take the size of the first ancestor widget, which can be a lot bigger than the dom element it is in and give you some weird behavior.

To fix this, wrap it in a BorderContainer, ContentPane or any sort of widget, or override the resize method to behave nicely with your configuration.
Continue reading

Callback not working in the FileTracker functions

Status: fixed in 2.0.3.3

You might have noticed that when using the ecm/model/FileTracker class in IBM Content Navigator, the callback is never called.

For instance if you are using the following code:

FileTracker.downloadAndTrackFiles(documentInfoObj, function (response) {
    console.log("Never invoked");
});

the callback is never called. This is because there is a defect in the FileTracker processMessage function, it does not look correctly for the callback because of a = missing in the condition:

var callbackResponse;
if (response.responses && response.responses.length > 0) {
	var callbackResponse;
	for ( var i = 0; i < response.responses.length; i++) {
		if (response.responses[i].errorCode = this.SERVER_RESPONSE_CALLBACK) {
			callbackResponse = response.responses[i];
			break;
		}
	}
} else if (response.errorCode == this.SERVER_RESPONSE_CALLBACK) {
	callbackResponse = response;
}

This is fixed in Fix Pack 3 though (2.0.3.3), so you can either upgrade or use a plugin to do an aspect around and replace the function by the correct one, which is:

processMessage: function(json, showSuccessMessage) {
	var methodName = "processMessage";
	this.logEntry(methodName);

	var response = dojojson.fromJson(json);
	if (response.hasError) {
		var errorPrefix = "", inserts = [];
		var showError = true;
		if (response.errorCode == 7) {//ERROR_OPEN_FAILED
			errorPrefix = "runtime_file_tracking_file_not_found_error";
		} else if (response.errorCode == 3) {
			errorPrefix = "runtime_file_tracking_ioexception_error";
		} else if (response.errorCode == this.ERROR_NOT_TRACKED) {
			showError = false;
		} else if (response.errorCode == this.ERROR_OPEN_FAILED) {
			showError = true;
			errorPrefix = "runtime_file_tracking_open_error";

		} else if (response.errorCode == this.ERROR_SAVE_FILE_FAILED) {
			showError = true;
			errorPrefix = "runtime_file_tracking_save_file_error";

		} else if (response.errorCode == this.ERROR_SAVE_FILE_FAILED_AND_OPEN_FIALED) {
			showError = true;
			errorPrefix = "runtime_file_tracking_save_file_after_checkout_error";

		} else if (response.errorCode == this.ERROR_ENVIRONMENT_VARIABLE_PATH_NOT_FOUND) {
			showError = true;
			errorPrefix = "runtime_file_tracking_ev_file_path_not_found_error";

		} else if (response.errorCode == this.ERROR_OPEN_CONNECTION) {
			showError = true;
			errorPrefix = "runtime_file_tracking_ioexception_error";

		} else if (response.errorCode == this.ERROR_FOLDER_NOT_FOUND) {
			showError = true;
			errorPrefix = "runtime_file_tracking_exact_file_path_not_found_error";

		} else if (response.errorCode == this.ERROR_EXACT_PATH_NOT_FOUND) {
			showError = true;
			errorPrefix = "runtime_file_tracking_exact_file_path_not_found_error";

		} else if (response.errorCode == this.ERROR_CANNOT_CREATE_TRACKING) {
			showError = false;
			errorPrefix = "runtime_file_tracking_exact_file_path_not_found_error";

		} else if (response.errorCode == this.ERROR_DELETE_FILE_FAILED) {
			showError = true;
			errorPrefix = "runtime_file_tracking_cannot_delete_file_error";

		} else {
			showError = true;
			errorPrefix = "runtime_file_tracking_generic_error";
		}

		if (showError) {
			if (response.responses && response.responses[0].value) {
				inserts.push(response.responses[0].value);
			} else if (response.value) {
				inserts.push(response.value);
			}
			Desktop.addMessage(Message.createErrorMessage(errorPrefix, inserts, false));
		}

	} else {
		var successMessage = "";
		if (response.responses) {

			if (response.responses.length == 1 && ((response.responses[0].errorCode == this.ERROR_DELETE_FILE_FAILED || response.responses[0].errorCode == this.FOUND_TRACKED_RECORD_BY_FILE_PATH) || (response.responses[0].errorCode == this.FOUND_TRACKED_RECORD_BY_SCANNING) || (response.responses[0].errorCode == this.SUCCESSFULLY_TRACKED_FILE_USING_ADS))) {

				successMessage = string.substitute(ecm.messages.file_tracking_successfully_downloaded_document, [
					response.responses[0].originalDocumentName,
					response.responses[0].value
				]);
			} else if (response.responses.length > 1 && ((response.responses[0].errorCode == this.FOUND_TRACKED_RECORD_BY_FILE_PATH) || (response.responses[0].errorCode == this.FOUND_TRACKED_RECORD_BY_SCANNING) || (response.responses[0].errorCode == this.SUCCESSFULLY_TRACKED_FILE_USING_UD) || (response.responses[0].errorCode == this.SUCCESSFULLY_TRACKED_FILE_USING_ADS))) {

				var count = response.responses.length;
				var documentsDownloaded = [];
				for ( var i = 0; i < count; i++) {
					documentsDownloaded.push(response.responses[i].originalDocumentName);
				}
				successMessage = string.substitute(ecm.messages.file_tracking_successfully_downloaded_document, [
					documentsDownloaded.join(",")
				]);

			}
		}

		if (successMessage && successMessage.length > 0) {
			Desktop.addMessage(new Message({
				number: 0,
				level: 0,
				text: successMessage
			}));
		}

		var callbackResponse;
		if (response.responses && response.responses.length > 0) {
			var callbackResponse;
			for ( var i = 0; i < response.responses.length; i++) {
				if (response.responses[i].errorCode == this.SERVER_RESPONSE_CALLBACK) {
					callbackResponse = response.responses[i];
					break;
				}
			}
		} else if (response.errorCode == this.SERVER_RESPONSE_CALLBACK) {
			callbackResponse = response;
		}
		if (callbackResponse && callbackResponse.value) {
			var lookupId = callbackResponse.value.callbackId;
			if (lookupId && this.callbackMap[lookupId]) {
				var callbackFunc = this.callbackMap[lookupId];
				if (callbackFunc) {
					callbackFunc(callbackResponse.value.response);
				}
			}
		}

	}

	this.logExit(methodName);
	return response;
	//MessageFactory.createErrorMessage = function(messagePrefix, inserts, backgroundRequest);

},

File Tracker download directory regression

Using Workplace XT, we were able to keep the folder hierarchy of a Document within the Object Store when downloading it with the File Tracker applet. That means, if your document’s path was /Folder/SubFolder/Document.xml, and your FileTracker folder on the client was C:\FileNet\Work, then you would get your document downloaded as C:\FileNet\Work\ObjectStoreName\Folder\SubFolder\Document.xml.

That’s no longer true with ICN. Everything goes into your download folder, C:\FileNet\Work in the previous example, without creating any sub-directories. This is especially an issue if you download a lot of document and want to edit them, this folder becomes a mess, and if a lot of documents are called the same in your Object Store, then you will have conflicts.

Officially, this is because this functionality is now covered by the Sync and Share feature, which uses a client agent on Windows platform, and is embedded in mobile applications. However this does not cover Unix platforms, and does not allow using Entry Templates, which can be a requirement for your platform. That’s why we will see how to make it work in ICN anyway.

How to fix that

Continue reading

Workplace XT Entry Template issues when used in ICN

I really had to write one single article about all issues occurring when using Workplace XT Entry Template in ICN, because at the time it wasn’t as clear as now in my mind. There are actually two main different issues (in some ways related) both concerning the Entry Templates in ICN, both because they are Workplace XT Entry Templates.

Therefore I am going to split them in two different issues, in two different threads:

  1. Inheritance of association of Entry Template ob folder made in ICN does not work, all-sub-folders does not inherit the association
  2. Associations of Entry Template on folder made via Workplace XT does not fully work in ICN

 

Workplace XT File Type issue in ICN

This is the second post about the issue occurring when using Workplact XT entry template with ICN. We’ve seen that there is an inheritance problem in this post, we will now see that there is a problem of File Types filters. This issue needs to be addressed if you want to use the second work around of the former issue.

Symptom

You’ve created Entry Templates in Workplace XT, and also created a few File Type Categories gathering several MIME Types. You’ve used these Entry Templates by associating them on a folder to use them when adding document. You restricted them by File Type Category. For example ET 1 is only for Images (File Type Images gathering image/png, image/jpeg, …), ET 2 is only for office documents, and ET3 is for every king of document. That looks a little bit like that in Workplace XT:

wpxt_entrytemplate_associations

Problem is that in ICN, this does not work. You always get the generic entry template (in my case misc doc, or no Entry Template if they all have restrictions on the File Type Categories.
Continue reading

Repository.retrieveItem(itemPath, callback) not working

I just noticed that the following function is not working as the documentation says in the ICN JavaScript model. Actually it can not be used with a document path.

retrieveItem(itemIdOrPath, itemRetrievedCallback, templateID, version, vsId, objectStoreId, action)

Continue reading

Changing an ICN file type filter name

Have you ever changed a File Type filter name in ICN? Well don’t, that’s not pretty. All the associations of Entry Templates you’ve done on folders will just stop working, or at least stop offering the user the right Entry Template for the document’s MIME Type. In the configuration it looks like this:

icn_filetype_filter_broken

Explanation is simple. In ICN, apparently there is no ID for File Type filter, or more specifically the name is the ID, which means where you are doing an Entry Template association in ICN, an JSON object is stored as a folder preferences annotation, persisting the File Type filter name directly. Of course if you change the File Type filter name, they won’t look for all folder preferences annotations and change the File Type filter name in it, which means they will all be broken.

Continue reading

Entry Templates inheritance not working

I had to refactor this article because it didn’t make as much sense as now in my mind when I first wrote it. This is now split in two with a main post being this one. Hopefully it will be more understandable for everyone!

Symptom

You have associated an entry template to a folder, or the ObjectStore itself. You tried to add a document into a subfolders, but your entry template never appears in the selection list of entry templates. If you go into the properties of the subfolders to see if the entry templates are correctly inherited, you can see either an empty list, or it says there are inherited entry templates but the File Types are really strange and error is displayed. Here are what you see and what you were expecting to see.

ICN_EntryTemplateIssue

What you see of one subfolder of the one you applied entry template on

ICN_EntryTemplateIssue2

What you see on a subfolder of the folder you saw the above screen shot

ICN_EntryTemplateIssue3

What you are expecting to see on your folder

Here is a video describing the problem, so you can understand better.

Cause

Continue reading

Custom MIME Type not working

Symptom

You want to use a new MIME Type in IBM Content Navigator, for example application/dita+xml. You did add a File Type filter under the settings panel from the administrator (DITA files using the dita MIME Type you just created).

ICN_customMIMEType

Then you used this file type filter to filter an entry template associated on a folder.

ICN_customMIMEType2

However the entry template is never displayed when adding a document. Instead you only see entry templates for Any type of file, or no entry template at all if you have none without filter.

ICN_customMIMEType3

Here we were expecting our entry template associated to the DITA file type filter

You’ve tried adding a MIME Type mapping to inform ICN in WebSphere virtual host, ICN’s web.xml and modify CE’s mimetypes.properties but nothing worked (well if you didn’t try these I can tell you it doesn’t).
Continue reading