Basically the cmis_sync module does not work. Theres still CCK and other D6 things going on :)

Heres a patch that fixes at least the basic fields (haven't gone through all of them yet though), a few undefined variables and makes the file fields work when binded as the content_field.

Comments

tcmug’s picture

StatusFileSize
new8.91 KB

Another patch that includes the above.

Fixes a problem with the actual cmis library (regarding changing summary/description and name via updateProperties). These can be updated via options array 'title' and 'summary'.

Also removed some unnecessary drupal_set_message from the sync.

Zimsil’s picture

May i please have a step-by-step guide on how to apply the patch via git or the alternative(esp the alternative). i am kind of a newbie at this. And how can i apply this patch on a drupal node that is running on the cloud

sher1’s picture

Here is some documentation on applying a patch
http://drupal.org/node/14231

As far as the cloud goes, it's kind of not relevant to the question. You should always apply a patch locally and then upload the patched file to your server, unless you are only developing locally. Best of luck

RMani’s picture

Hi ,
I tried to apply this patch but it seems to fail in D7.10
Could you please help me fix the same
regards,
Rekha

RMani’s picture

I was able to succesfully apply it once i
applied the patch this way

patch -p1 < syncfixes-1291988.patch
i was trying to use
patch -p0 < syncfixes-1291988.patch

Thank you
Regards,
Rekha

Zimsil’s picture

applied this but now i cannot run cron. how can i get CRON to run afterwards

tobiasb’s picture

StatusFileSize
new7.89 KB

The attached patch is for 7.x-2.x

tobiasb’s picture

StatusFileSize
new7.89 KB

The attached patch is for 7.x-2.x

* Fixed the whitespace

IanNorton’s picture

Assigned: Unassigned » IanNorton
IanNorton’s picture

Status: Needs review » Closed (fixed)

Fixed in latest commit

gravitonian’s picture

Hi,

I'm using the 7.x-1.x-dev code.
The syncfixes-1291988.patch has been applied to the code I belive as it comes with the package.
The sync works except it does not sync content.
I get an error:
Notice: Undefined index: edit-media in CMISService->getLink() (line 422 of /var/www/drupal/sites/all/modules/cmis/cmis_common/lib/cmis_repository_wrapper.php).
Notice: Undefined property: stdClass::$nid in _cmis_sync_cmis_drupal_prepare() (line 243 of /var/www/drupal/sites/all/modules/cmis/cmis_sync/cmis_sync.cmis.inc).

Not sure why the Undefined index: edit-media is an error, edit-media is usually used to for example update content for a node.

The second error seems to be an error when the system wants to log the property after not being able to fetch content for the node.

To fix this I had to change the code so the node reference does not have the last ";1.0" bit with the version number (/var/www/drupal/sites/all/modules/cmis/cmis_sync$ sudo vi cmis_sync.cmis.inc), around 240:

try {
// Strip of version number
$cmis_object->id = substr($cmis_object->id, 0, -4);
watchdog('repoId', 'Repo Id is @message', array('@message'=>$cmis_object->id), WATCHDOG_WARNING);

_cmis_sync_drupal_node_field_value($node,
$sync_map_type['content_field'],
cmisapi_getContentStream($repository->repositoryId, $cmis_object->id),
$cmis_content_context);

Maybe I have something else not configured properly but this works anyway.
I am successfully using all other features like "CMIS File", "CMIS Folder" fields and CMIS Views blocks.

IanNorton’s picture

Hi gravitonian,

You're correct the patch has been merged into the source code, the .patch file itself should not be part of the source (as it's already merged) and I have removed this in the latest dev release (just pushed).

Could you let me know what files you're trying to sync and the setup in the settings.php file? Please also confirm that you're running the very latest code from the dev branch.

Just for reference I have these very simple settings to sync files from one of my folders into Drupal for the 'basic' content type (machine name of page)

$conf['cmis_sync_map'] = array(
  'page' => array(
    'enabled' => TRUE,
    'cmis_folderPath' => '/Sites/marketing/documentLibrary/Web'
  ),
);
gravitonian’s picture

Hi,

This fix is not yet in 7.x-1.2.

I patched 7.x-1.2 and it now works to sync the actual content.

I am using a simple sync config as in your example above:

$conf['cmis_sync_map'] = array(
'page' => array(
'enabled' => TRUE,
'cmis_folderPath' => '/Sites/common-website-assets/documentLibrary/Pages',
));

Yuri’s picture

Having installed the latest dev of this module, running cron gives this error:

Notice: Undefined property: stdClass::$body in _cmis_sync_drupal_node_field_value() (line 204 of /home/office/public_html/sites/all/modules/cmis/cmis_sync/cmis_sync.drupal.inc).
Notice: Undefined property: stdClass::$renditions in cmis_views_process_cmis_data() (line 507 of /home/office/public_html/sites/all/modules/cmis_views/cmis_views.module).

It seems like this is still an issue?

Yuri’s picture

Status: Closed (fixed) » Active