I recently noticed that I am getting errors when nodes are saved. I get this error both ways: (1) resaving nodes that were already created in order to get autotagging to run the node through OpenCalais and (2) creating new nodes.

It is strange because I didn't notice this error until today when I upgraded to beta3 yesterday. I went back through a couple days of log history, and it only started around lunch time (Eastern Standard Time, US). I don't know if this is an error on autotagging's part or OpenCalais.

Let me know if I can provide you with any additional information.

    * warning: DOMDocument::loadXML() [domdocument.loadxml]: Opening and ending tag mismatch: HR line 7 and body in Entity, line: 7 in /var/www/html/sites/all/modules/autotagging/modules/autotagging_calais/autotagging_calais.module on line 47.
    * warning: DOMDocument::loadXML() [domdocument.loadxml]: Opening and ending tag mismatch: HR line 1 and html in Entity, line: 7 in /var/www/html/sites/all/modules/autotagging/modules/autotagging_calais/autotagging_calais.module on line 47.
    * warning: DOMDocument::loadXML() [domdocument.loadxml]: Premature end of data in tag body line 1 in Entity, line: 7 in /var/www/html/sites/all/modules/autotagging/modules/autotagging_calais/autotagging_calais.module on line 47.
    * warning: DOMDocument::loadXML() [domdocument.loadxml]: Premature end of data in tag html line 1 in Entity, line: 7 in /var/www/html/sites/all/modules/autotagging/modules/autotagging_calais/autotagging_calais.module on line 47.
    * recoverable fatal error: Argument 1 passed to DOMXPath::__construct() must be an instance of DOMDocument, boolean given, called in /var/www/html/sites/all/modules/autotagging/modules/autotagging_calais/autotagging_calais.module on line 18 and defined in /var/www/html/sites/all/modules/autotagging/modules/autotagging_calais/autotagging_calais.module on line 48.
    * warning: DOMXPath::__construct() expects parameter 1 to be DOMDocument, boolean given in /var/www/html/sites/all/modules/autotagging/modules/autotagging_calais/autotagging_calais.module on line 48.
    * warning: DOMXPath::registerNamespace() [domxpath.registernamespace]: Invalid XPath Context in /var/www/html/sites/all/modules/autotagging/modules/autotagging_calais/autotagging_calais.module on line 49.
    * warning: DOMXPath::registerNamespace() [domxpath.registernamespace]: Invalid XPath Context in /var/www/html/sites/all/modules/autotagging/modules/autotagging_calais/autotagging_calais.module on line 50.
    * warning: DOMXPath::evaluate() [domxpath.evaluate]: Invalid XPath Context in /var/www/html/sites/all/modules/autotagging/modules/autotagging_calais/autotagging_calais.module on line 52.

Comments

IncrediblyKenzi’s picture

It sounds like the calais service isn't responding properly (either returning an error or returning malformed XML). I assume you have the API Key for calias installed?

You can try printing out the URL that the autotagging_calais module is passing in to drupal_http_request and then POSTing that using wget or similar to see what the actual response is.

Note that there's not a lot of error handling on the xml fetches going on currently (hence the beta moniker :)). I plan on offering retry support at some point.

mkinnan’s picture

Thanks for the info. I printed out $url . $alldata and used wget. This is what I get from the 5 or so I tried when I finally get a response:

<Error Method="ProcessText" calaisRequestID="177e8c38-f4a5-02d2-1227-b2180da4afc2" CreationDate="2009-07-14 17:18:29" CalaisVersion="R4.2_7.1.1103.5"><Exception>content is invalid: 'null' .</Exception></Error>

It took me several attempts to get 1 response from each link I tried. I would get several ERROR 500 INTERNAL SERVER ERROR before wget got the file. Additionally, I noticed the calaisRequestID in the responses. This probably explains why autotagging doesn't work for repeated attempts on the same node. For example, if I get the errors or autotagging doesn't get the tags when the node is saved the first time, I can't ever get the tags even if I edit and re-save the node multiple times.

IncrediblyKenzi’s picture

Assigned: Unassigned » IncrediblyKenzi
Status: Active » Needs work

Thanks for the feedback.

I'm going to address this issue as part of the deferral/reprocessing of nodes task that I have listed on the project page. Stay tuned for more.

damienmckenna’s picture

Title: DOMDocument and DOMXPath Errors » OpenCalais: DOMDocument and DOMXPath Errors

Just helping to clarify where the issue is.

damienmckenna’s picture

Title: OpenCalais: DOMDocument and DOMXPath Errors » All providers: DOMDocument and DOMXPath Errors

After receiving the error with Yahoo Term Extractor, I'm updating the issue to show it's a general issue.

IncrediblyKenzi’s picture

Status: Needs work » Fixed

I added a check for a 200 response code for all modules. This should help a bit til we get the retry functionality in place.

IncrediblyKenzi’s picture

Version: 6.x-1.3-beta3 » 6.x-1.x-dev

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.