Hai,

I tried to connect Alfresco 3.4.11 with drupal 8 using CMIS. I installed and enabled the CMIS module. I followed the instructions which is given in (https://www.drupal.org/node/2802669). After configure CMIS connection i clicked the Browse link, then site displays "The website encountered an unexpected error. Please try again later." .
CMIS_connection_Drupal_8.png
I found the error in recent logs and i enclosed error details which i am facing. Please give a solution for this.
D8_CMIS_ISSUE.png

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

kurinji selvan created an issue. See original summary.

dj1999’s picture

I have not this error. Please find the install video. It is a new drupal 8.2.6 site. Installed first time the cmis module.
Video: https://youtu.be/sYNRXnwmCF4

dj1999’s picture

Status: Active » Postponed (maintainer needs more info)
kurinjiselvan v’s picture

Thankyou for your response @dj1999. Can i know the Alfresco version that you tried. I used the older version 3.4.d(Community Edition). In that version only i faced this issue. I need that version only.

dj1999’s picture

My Alfresco version is Community - 5.2.0 (r130508-b9)

kurinjiselvan v’s picture

But i need to work with Alfresco 3.4.11 . I just installed 3.4.d (Community Edition) in my local system and tried to integrate in that time i am facing error. Can you please try with this version & give some solution for this?

dj1999’s picture

Please ask this question from cmis client developers (https://github.com/dkd/php-cmis-client/issues). I think if client is able to handle older version of Alfresco server this issue will resolve too.

dj1999’s picture

Status: Postponed (maintainer needs more info) » Closed (works as designed)
karamveersingh’s picture

Hello All,

I faced same issue which reported by @kurinji but with latest version of Alfresco-community edition 5.x.x

Could you please guide what wrong from my end, just for the reference sharing attached error screenshot.
please help,thanks in advance

dj1999’s picture

Please use this version: git clone --branch 8.x-2.x https://git.drupal.org/project/cmis.git
Find here more instruction: https://www.drupal.org/node/2858700#comment-12006965

karamveersingh’s picture

FileSize
34.98 KB

@dj1999 Thanks for your instructions, I am trying your instructions will let you know if anything else.

Also please ignore my latest attachments , by mistake added.

thanks,
karamveer

karamveersingh’s picture

FileSize
47.63 KB
karamveersingh’s picture

@dj1999 today I continued worked on CMIS and followed your instructions , now I am getting 401 error.For the confirmation I tried your reference CMIS-browse url(https://www.drupal.org/node/2858700#comment-12009677) with credentials but same 401 error received.

Please let me know do I need to upgrade PHP version from 5.6.6 to 7.X.X ? , currently we're using PHP 5.6.6

Error:
Dkd\PhpCmis\Exception\CmisUnauthorizedException: { "status" : { "code" : 401, "name" : "Unauthorized", "description" : "The request requires HTTP authentication." }, "message" : "04010033 Authentication failed for Web Script org\/alfresco\/api\/opencmis\/OpenCMIS.get", "exception" : "", "callstack" : [ ], "server" : "Community v5.2.0 (r135134-b14) schema 10,005", "time" : "May 1, 2017 5:56:50 PM" } in Dkd\PhpCmis\Bindings\Browser\AbstractBrowserBindingService->convertStatusCode() (line 330 of E:\wamp\www\drupal-8.1.3\modules\cmis\vendor\dkd\php-cmis\src\Bindings\Browser\AbstractBrowserBindingService.php).

Could you please guide me what else from my end?

thanks,
karamveer

dj1999’s picture

@karamveersingh yes you need to upgrade to php 7 because dkd/php-cmis dev-master uses php 7 syntax.

karamveersingh’s picture

@dj1999 thanks for your input , we used php latest version which is 7.0.15 , but sorry to say still received same error - >

Dkd\PhpCmis\Exception\CmisUnauthorizedException: { "status" : { "code" : 401, "name" : "Unauthorized", "description" : "The request requires HTTP authentication." }, "message" : "04020003 Authentication failed for Web Script org\/alfresco\/api\/opencmis\/OpenCMIS.get", "exception" : "", "callstack" : [ ], "server" : "Community v5.2.0 (r135134-b14) schema 10,005", "time" : "May 2, 2017 12:19:26 PM" } in Dkd\PhpCmis\Bindings\Browser\AbstractBrowserBindingService->convertStatusCode() (line 330 of C:\xampp\htdocs\drupal-8.1.3\modules\cmis\vendor\dkd\php-cmis\src\Bindings\Browser\AbstractBrowserBindingService.php).

Just for the reference sharing applied CMS -connection settings screenshot please check may be I am using wrong settings.

karamveersingh’s picture

any update on my issue? please help asap

karamveersingh’s picture

@dj1999 Could you please respond on my queries, actually my assignment going to delayed due to those issue.
Kindly suggest appropriate solution so that I can wrap-up the CMIS connection and move to next step of Alfresco.

thanks,
Karamveer

dj1999’s picture

FileSize
68.01 KB

Please test with Alfresco test repo.

Url: https://cmis.alfresco.com/alfresco/api/-default-/public/cmis/versions/1....
User: admin
Passwd: admin

Test settings

karamveersingh’s picture

@dj1999 thanks for your inputs, I already tried above details , today again tried but again received this error - >

Dkd\PhpCmis\Exception\CmisRuntimeException: cURL error 60: SSL certificate problem: self signed certificate in certificate chain in Dkd\PhpCmis\Bindings\Browser\AbstractBrowserBindingService->convertStatusCode() (line 342 of E:\wamp\www\drupal-8.1.3\modules\cmis\vendor\dkd\php-cmis\src\Bindings\Browser\AbstractBrowserBindingService.php).

karamveersingh’s picture

@dj1999 hope you're doing well and reviewed my last messages, just a follow-up messages could you please tell me when I get the solution and response on my issue?

dj1999’s picture

@karamveersingh unfortunatelly (or fortunatelly) the php-cmis client dev version fluently developing therefore this dev library and our 8.2-dev version is usable just for developing not for production.

Did you try the 8.1 drupal version? This use a stable php-cmis library and able connecting for example the Alfresco test repo.
Disable and remove cmis 8.2-dev module. Delete the cmis folder.
Download 8.1-dev module.
In cmis folder run command: composer require dkd/php-cmis
Enable cmis 8.1-dev module.

karamveersingh’s picture

@dj1999 thanks for your messages/instructions, I followed same but sorry to say again prompted same error.

Error ->
Dkd\PhpCmis\Exception\CmisRuntimeException: cURL error 60: SSL certificate problem: self signed certificate in certificate chain in Dkd\PhpCmis\Bindings\Browser\AbstractBrowserBindingService->convertStatusCode() (line 342 of E:\wamp\www\drupal8.1\modules\cmis\vendor\dkd\php-cmis\src\Bindings\Browser\AbstractBrowserBindingService.php).

Steps I followed :

downloaded/configured Drupal 8.1 version see attached screenshot
Downloaded/configured CMIS 8.1-dev version see attached screenshot
Applied browse settings https://www.drupal.org/node/2856253#comment-12076826

Please suggest what else from my end?

dj1999’s picture

Sorry for my english. My comment is ambiguous.

I had been meaned 8.1 version of CMIS API (https://www.drupal.org/project/cmis/releases/8.x-1.x-dev or git clone --branch 8.x-1.x https://git.drupal.org/project/cmis.git).

Please use the latest drupal 8 version and the 8.x-1.x-dev version from CMIS API.

karamveersingh’s picture

@dj1999 thanks for your messages, tried suggested steps but sorry to say still facing same issue ->

Dkd\PhpCmis\Exception\CmisRuntimeException: cURL error 60: SSL certificate problem: self signed certificate in certificate chain in Dkd\PhpCmis\Bindings\Browser\AbstractBrowserBindingService->convertStatusCode() (line 342 of E:\wamp\www\drupal-8.1.3\modules\cmis\vendor\dkd\php-cmis\src\Bindings\Browser\AbstractBrowserBindingService.php).

akozma’s picture

I'm getting the same issue testing with both of the versions
- local installation, http://127.0.0.1:8080/alfresco/api/-default-/public/cmis/versions/1.1/br...
- and https://1ktudo.trial.alfresco.com/alfresco/api/-default-/public/cmis/ver...

The "Browse" functionality always returns with the message:

Dkd\PhpCmis\Exception\CmisUnauthorizedException: { "status" : { "code" : 401, "name" : "Unauthorized", "description" : "The request requires HTTP authentication." }, "message" : "05010005 Authentication failed for Web Script org\/alfresco\/api\/opencmis\/OpenCMIS.get", "exception" : "", "callstack" : [ ], "server" : "Enterprise v5.2.0 (r134899-b26) schema 10,005", "time" : "Jun 1, 2017 1:33:00 PM" } in Dkd\PhpCmis\Bindings\Browser\AbstractBrowserBindingService->convertStatusCode() (line 338 of /var/www/html/drupal8/cmis/web/modules/contrib/cmis/vendor/dkd/php-cmis/src/Bindings/Browser/AbstractBrowserBindingService.php).

karamveersingh’s picture

hello all,

any update on my issue? sorry to say problem open from last 2 months, please please help me

dj1999’s picture

Status: Closed (works as designed) » Needs work

@karamveersingh
I checked this problem and found that something changed in libraries therefore cmis client queries not able to properly executing called from drupal module. Unfortunately I am very busy now and have not time to fix it. If somebody has time and send patch I'll put it to repo. Sorry!

karamveersingh’s picture

anybody can help in this issue?
really appreciable if any can

markandrewsutton’s picture

@karamveersingh (and anybody else getting stuck here),
I was hoping to be able to use this module (and the dkd/php-cmis-client library) to connect to an existing Alfresco instance running 4.2.1 and have determined it's not going to work as expected. Wish I had a quick fix, but unfortunately, there is more to it. Hopefully, the following info is helpful in pointing you in the right direction:

Alfresco/CMIS Versions
Currently, the latest ("dev-master") version of the dkd/php-cmis-client lib only supports Browser binding, which requires CMIS version 1.1. If, like me, your Alfresco instance supports only CMIS version 1.0, the library will not work as is. You are getting this error because your endpoint is responding with XML-based AtomPub, rather than the simpler JSON-based response php-cmis-client is expecting.

8.x-2.x-dev
It DOES work with the latest dkd/php-cmis-client. But, again, only with CMIS 1.1. Installing with composer takes some workarounds, but the proof of concept does work with the example provided above.

So now what?
Since I'm dealing with this question at the moment, I thought I'd share.

  1. BEST - If you are able to upgrade your Alfresco installation, that's what I would recommend most. The JSON binding in 1.1 is MUCH easier to work with, and all the cool kids use JSON these days :)
  2. ALSO GOOD - You can try submitting an issue - or better yet a pull request - with https://github.com/dkd/php-cmis-client. The developers mention they aren't currently working on support for AtomPub. If I had time, I'd work on this, but I do not, so . . .
  3. NOT GREAT BUT IF YOU GOTTA DO IT - roll your own using the 7.x version as your starting point. I considered this (basing off https://www.drupal.org/project/cmis/releases/7.x-2.x-dev), but I'm going to focus my efforts on option 1 at this time.

Thanks so much @dj1999! This is a great starting point and should be very useful for anybody who can use CMIS 1.1.

karamveersingh’s picture

@markandrewsutton thanks for your time and explanation on my issue, this is really appreciable. Sure I will follow your instructions/suggestions and get back to you.

Confirmation: Is issue which I am facing , resolved from your end ? (FYI I am using CMIS/ALFRESCO on Drupal 8)