Using the 'cmis_folderId'-option in $conf['cmis_sync_map'], there is a 500-Error when a new drupal node is added. The error in alfresco.log is as follows:

16:57:58,060 ERROR [org.alfresco.web.scripts.AbstractRuntime] Exception from executeScript - redirecting to status template error: 02150093 Wrapped Exception (with status template): 02150092 Failed to execute script '/org/alfresco/cmis/item.get.js (in classpath store file:/opt/alfresco-3.2r2/tomcat/webapps/alfresco/WEB-INF/classes/alfresco/templates/webscripts)': 02150091 Invalid store ref: Does not contain :// workspace:/%2FSpacesStore
org.alfresco.web.scripts.WebScriptException: 02150093 Wrapped Exception (with status template): 02150092 Failed to execute script '/org/alfresco/cmis/item.get.js (in classpath store file:/opt/alfresco-3.2r2/tomcat/webapps/alfresco/WEB-INF/classes/alfresco/templates/webscripts)': 02150091 Invalid store ref: Does not contain :// workspace:/%2FSpacesStore

This error does *not* occur on a updates of already sync'd nodes - although the same "urlencoded" cmis_folderId (raw e.g.workspace://SpacesStore/ad80fd3a-2ae9-4a3e-bfef-e89070c01e83, drupal_urlencode: workspace%3A%2F%2FSpacesStore%2Fad80fd3a-2ae9-4a3e-bfef-e89070c01e83) is used; maybe there is an issue on the Alfresco-end of things.

Updating/inserting without drupal_urlencode-ing the cmis_folderId seems to solve the problem. I have not tested extensively and url-encoding could "bite" somewhere else in the process, as i don't know the code particularly well. On the other hand, the functioning "cmis_folderPath"-option (line 120) uses the folderId returned by cmisapi_getObjectByPath without urlencoding it, so this should be "safe" fix.

One line "patch" attached.

Environment: drupal-6.16, alfresco-3.2r2, ubuntu-9.10

CommentFileSizeAuthor
cmis_urlencoded_folderId.patch661 bytesfrega

Comments

frega’s picture

Title: CMIS Sync - drupal_urlencode of 'cmis_folderId' causes 500 in on adding a new object » CMIS Sync - drupal_urlencode of 'cmis_folderId' causes error (500) on adding a new object
cbalan’s picture

Status: Active » Fixed

Thank you for reposting this.

Applied patch in http://drupal.org/cvs?commit=342026
Closing this ticket.

Thank you,
Catalin Balan

cbalan’s picture

Status: Fixed » Closed (fixed)