I'm really green. I just installed module and I got this errors:
Error received from endpoint:403
Failed to invoke service /api/repository Code:401
Bad XML return
Bad XML return
Unable to communicate with repository.
(Alfresco working good with default settings)
thx for help

CommentFileSizeAuthor
#5 unencode-password.patch941 bytesjpsalter

Comments

michaelj’s picture

In file 'cmis_alfresco.module' line 102 password is save in base64_encode
'$form_state['values']['cmis_alfresco_password'] = base64_encode($form_state['values']['cmis_alfresco_password']);'
and then in file 'cmis_alfresco.utils.inc' line 31 (code which is responsible for ticket...) there is no base64_decode password (password is exactly got from password variable saved in base64)
'$pass = variable_get('cmis_alfresco_password', '');'
thats why I couldn't connect with repository

jbaldo’s picture

Title: what am i doing wrong? » Thanks!

Thanks for your brilliance on this.

I had the same thing going on.

jbaldo’s picture

Title: Thanks! » Trouble Connecting to Repository: "Error received from endpoint:403"
jpsalter’s picture

Category: support » bug
Priority: Normal » Critical

What a rookie mistake in the stable version. Let's get this fixed.

jpsalter’s picture

StatusFileSize
new941 bytes

I found two instances where the password is loaded. Attached is a small patch to unencode them.

madsph’s picture

Thanks for posting this - helped a lot!

ruffie’s picture

Hello,

I'm having this same problem, but I didn't need to apply the patch, because the .inc file was already modified correctly from download (I downloaded today).
I'm still getting the exact same error message though.
This is on a linux box, with all required settings enabled (curl etc).
Typing in the credentials in the alfresco module says its being saved, but I don't see the "saved" password asterisks...
On a window box, all works and there I see the "saved" password asterisks, so does it have something to do with that?

I get no error when saving.

thelwyn’s picture

Hello,

I have the same problem as ruffie above, with a fresh download of the CMIS_Alfresco module.

But in my case, it's working well on my local Drupal install, and I get the error only on a live Drupal install.
The first one can access the Alfresco instance (which is on a live server), the second can not access the same Alfresco instance, with same settings.

I can see a difference between the 2 Drupal install. On the one failing, I have an alert message in report status:

"HTTP request status Fails"

It seems that this is a common problem according to messages on forum. Maybe it's related and need to be fixed to fix the Alfresco problem.

I will get back if I find a solution.

Regards

Thelwyn

thelwyn’s picture

Hum I just noticed that my local instance is running a PHP 5.2.6 (OK) whereas the live server is running PHP 5.1.6 (and not OK) due to RedHat.
Also it seems that in the second case, this:

$ticket = (string) $ticketXml[0];

is not returning anything, while $ticketXml is containing data..

Could the problem be related to SimpleXML needing PHP 5.2 instead of 5.1 ?

Thanks,
Thelwyn

cfuller12’s picture

Status: Active » Closed (fixed)

Yes, PHP 5.2 is definitely required. I've edited the project page to break out the requirements more clearly and made sure that this is in the list. Sorry for any frustration that caused!

thelwyn’s picture

Great :) at least now i'm pretty sure of the problem and can think of fixing it...

Many thanks!