Attachment Repository error "SET.repository is null or not an object"

Document ID : KB000050707
Last Modified Date : 14/02/2018
Show Technical Document Details

Description:

Attachments may fail to upload if the "Upload Path" for Service Desk/CMDB Attachment Repositories contain the special character of a backslash "\" as the final character.

This character is incorrectly interpreted by JavaScript during the Create Attachment process under some conditions. For example, the following set of conditions is one known trigger:

  • Logged in Contact has an Access Type of "Employee" or "Guest."

  • Version of Service Desk/CMDB is 12.n. Versions below this are un-impacted.

  • There is a backslash "\" as the final character in the URL on any Attachment Repository. NB Not just the repository that used during Create New Attachment.

  • When accessing "Create New Attachment" and clicking on the "Locate File" button.

It may cause the following symptoms:

  • The browser status bar displays "Error on page."

  • Double-clicking the status bar error gives further script error information of:

    Line: 14
    Char: 1
    Error: 'SET.repository' is null or not an object
    Code: 0

  • Trying to Save the webpage address, rather than a File Upload, gives the on-screen error of:

    AHD03075: Required attribute Attachment Name is missing from object Attachment.

  • The Service Desk/CMDB stdlog contains the line:

    11/24 11:12:36.25 MyServer web:local 4192 ERROR freeaccess.spl 20322 create checkin of attmnt:400012 failed: AHD03075: Required attribute Attachment Name is missing from object Attachment"

  • An Attachment Repository system that was working is no longer working after an upgrade from an earlier version, where a different JavaScript implementation was in use.

  • An Attachment Repository system that was working is no longer working after an additional Repository as been added or modified.

Solution:

The default URL used in the Service Desk Manager "Upload Path" is written only using forward slashes "/" and does not include a terminating slash.

Leaving out the terminating backslash in the URL, and using a path similar in structure to that provided out-of-the-box will avoid this error.

The Attachment Repository setup is located under the Administration tab. See the Attachments Library, Repositories, right click on each Repository and choose Edit, Upload Path.

Correct Usage - Note the forward slashes and lack of terminating slash:

  • F:/PROGRA~1/CA/SERVIC~1/site/attachments/default/servicedesk/files

    Figure 1

Incorrect Usage - has a terminating backslash.

  • F:/PROGRA~1/CA/SERVIC~1/site/attachments/default/servicedesk/files\

Also incorrect for the same reason, although the other backslashes do not cause the parse problem:

  • F:\PROGRA~1\CA\SERVIC~1\site\attachments\default\servicedesk\files\