Inside cmis_sync/cmis_sync.cmis.inc, the _cmis_sync_cmis_drupal_handle_updates uses the variable $repository, but in the function, $cmis_repository is used.

$cmis_repository should be changed to $repository - this occurs twice

    * Creates/updates Drupal nodes with CMIS content.
    *
    * @param $repository
    * @param $sync_map_type
    * @param $node_type
    */
   function _cmis_sync_cmis_drupal_handle_updates($repository, $sync_map_type, $node_type) {
     // get CMIS object properties
     if (isset($sync_map_type['cmis_folderId'])) {
       $cmis_folder = cmisapi_getProperties($cmis_repository->repositoryId, $sync_map_type['cmis_folderId']);
     }
     elseif (isset($sync_map_type['cmis_folderPath'])) {
       $cmis_folder = cmisapi_getObjectByPath($cmis_repository->repositoryId, $sync_map_type['cmis_folderPath']);
     }
     else {
       throw new CMISException(t("Please set `cmis_folderPath` or `cmis_folderId` properties for [@type] Drupal type.", array(
         '@type' => $node_type
       )));
     }
CommentFileSizeAuthor
#3 cmis.1169698.3.patch1.03 KBtobiasb
#2 cmis.1169698.3.patch1.03 KBtobiasb
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

soundasleep’s picture

Confirmed in separate install -- a quick workaround is simply to add the following at the start of that function:

$cmis_repository = $repository;

Otherwise, the following error occurs:

Notice: Undefined variable: cmis_repository in _cmis_sync_cmis_drupal_handle_updates() (line 73 of drupal-7.10\sites\all\modules\cmis\cmis_sync\cmis_sync.cmis.inc).
Notice: Trying to get property of non-object in _cmis_sync_cmis_drupal_handle_updates() (line 73 of drupal-7.10\sites\all\modules\cmis\cmis_sync\cmis_sync.cmis.inc).
tobiasb’s picture

Status: Active » Needs review
Issue tags: +Novice
FileSize
1.03 KB
tobiasb’s picture

FileSize
1.03 KB

* Fixed a typo

IanNorton’s picture

Assigned: Unassigned » IanNorton
IanNorton’s picture

Status: Needs review » Closed (fixed)

Fixed in latest commit - thanks to tobiasb for the patch