TIU11 / Basic-CMIS

Wordpress Plugin for basic CMIS integration. Searches a CMIS compliant system and renders the matching documents.
10 stars 5 forks source link

cmis_repository_wrapper.php trows an uncaught exception #1

Open DeliusPit opened 9 years ago

DeliusPit commented 9 years ago

Hello,

Probably I am doing something wrong, however, whatever I try, I can't get past the error underneath. I have tested against two Alfresco instances. Both on Alfresco Community 5.0 edition. The old Wordpress CMIS plugin found on Google Code is working against both repositories. So are other CMIS based products like CMISSync and LibreOffice. So the error doesn’t seem to be repository based.

Your plugin looks promising, could you tell me if you understand what is going wrong here?

Best regard, Delius Pit

PHP Fatal error: Uncaught exception 'CmisInvalidArgumentException' with message 'Apache Chemistry OpenCMIS - invalidArgument error

HTTP Status 400 - invalidArgument

Invalid boolean value!


\norg.apache.chemistry.opencmis.commons.exceptions.CmisInvalidArgumentException: Invalid boolean value!\n\tat org.apache.chemistry.opencmis.commons.impl.XMLWalker.readBoolean(XMLWalker.java:204)\n\tat org.apache.chemistry.opencmis.commons.impl.XMLConverter$35.read(XMLConverter.java:2632)\n\tat org.apache.chemistry.opencmis.commons.impl.XMLConverter$35.read(XMLConverter.java:2617)\n\tat org.apache.chemistry.opencmis.commons.impl.XMLWal in /var/www/html/wp-content/plugins/Basic-CMIS-master/lib/cmis_repository_wrapper.php on line 104

ansonhoyt commented 9 years ago

Thanks for the heads up @DeliusPit. I haven't noticed that exception in our site, though our use cases might not have had the same options being passed in, etc. I'm not working in this space in the coming weeks, but next time we work on this, I'll check back with this bug and see if I can add something.

I know that isn't much help. There's a 60% chance it sees some love in the next few months. Would be happy to look at a pull request if you find something.

pateljj04 commented 9 years ago

Just to add in - this was tested against Alfresco 4.2, we haven't tested it with Alfresco 5.0, it could very well be that, that is what broke it.

DeliusPit commented 9 years ago

Hello @ansonhoyt, thank you for your reply. I have an Alfresco 5.0 server that you could use for a test. Also I am more than willing to do some extra tests myself.

BTW @pateljj04 , I can hardly imagine 5.0 is breaking up the plugin. 5.0 is compliant with other CMIS based products. I didn't do anything complex either, just the very basic [cmis keywords="test"] and [cmis folder= “some folder”]. Where I am sure both the keywords and the folder exist.

iwkse commented 9 years ago

Hi all, I just discovered this plugin and I run into the same error as well. Alfresco 5 here. I'm attaching the full log:

2015/09/02 19:20:04 [error] 10280#0: *254 FastCGI sent in stderr: "PHP message: PHP Fatal error:  
Uncaught exception 'CmisInvalidArgumentException' with message '<html><head><title>Apache Chemistry OpenCMIS - invalidArgument error</title><style><!--H1 {font-size:24px;line-height:normal;font-weight:bold;background-color:#f0f0f0;color:#003366;border-bottom:1px solid #3c78b5;padding:2px;} BODY {font-family:Verdana,arial,sans-serif;color:black;font-size:14px;} HR {color:#3c78b5;height:1px;}--></style></head><body><h1>HTTP Status 400 - <!--exception-->invalidArgument<!--/exception--></h1><p><!--message-->Invalid boolean value!<!--/message--></p><hr noshade='noshade'/><!--stacktrace--><pre>
org.apache.chemistry.opencmis.commons.exceptions.CmisInvalidArgumentException: Invalid boolean value!
VitSchnaubelt commented 8 years ago

Following steps should solve problems on alfresco 5.

  1. rename plugin folder to "basic-cmis" !!case sensitive!!
  2. in basic-cmis.php change row 53 from array_push($query_conditions, "IN_FOLDER('$f->id')"); to array_push($query_conditions, "IN_FOLDER(d,'$f->id')");
  3. delete _cmis_repository_wrapper.php from lib/_ and download both files from https://svn.apache.org/repos/asf/chemistry/phpclient/trunk/atom/cmis/
  4. put require_once ($PLUGIN_PATH . 'lib/cmis_service.php'); to basic-cmis.php

and heureca (sorry for my english)