Have multiple site running -6.x-1.4. working great.. upgraded 2 sites to 2.0. no tagging zip zero nada? tried exact same post on site running 1.4 tags perfectly. no changes made after upgrade to 2.0 relevancy set at 0 tried 0.5 nothing.
****
blowd up
****
Fatal error: Call to a member function readable_type() on a non-object in /home/chenoweb/public_html/f-150garage.com/modules/opencalais/calais.module on line 199
-------
warning: array_diff() [function.array-diff]: Argument #1 is not an array in /home/chenoweb/public_html/f-150garage.com/modules/opencalais/calais_tagmods.module on line 77.
warning: array_values() [function.array-values]: The argument should be an array in /home/chenoweb/public_html/f-150garage.com/modules/opencalais/calais_tagmods.module on line 78.

same post here http://datatexk.net for comparison (this site Open Calais 6.x-1.4)

Comments

jjcheno’s picture

yikes! cant go back to previous version either...

Fatal error: Cannot redeclare calais_api_requirements() (previously declared in /home/chenoweb/public_html/f-150garage.com/modules/opencalais/calais_api.module:17) in /home/chenoweb/public_html/f-150garage.com/modules/opencalais/calais_api.install on line 45

yelvington’s picture

I can verify: Upgrade to 2.x goes ka-BOOM.

Fatal error: Call to a member function readable_type() on a non-object in /var/www/yelvington.com/sites/all/modules/opencalais/calais.module on line 199

* warning: array_diff() [function.array-diff]: Argument #1 is not an array in /var/www/yelvington.com/sites/all/modules/opencalais/calais_tagmods.module on line 77.
* warning: array_values() [function.array-values]: The argument should be an array in /var/www/yelvington.com/sites/all/modules/opencalais/calais_tagmods.module on line 78.
* warning: array_diff() [function.array-diff]: Argument #1 is not an array in /var/www/yelvington.com/sites/all/modules/opencalais/calais_tagmods.module on line 77.
* warning: array_values() [function.array-values]: The argument should be an array in /var/www/yelvington.com/sites/all/modules/opencalais/calais_tagmods.module on line 78.
* warning: array_diff() [function.array-diff]: Argument #1 is not an array in /var/www/yelvington.com/sites/all/modules/opencalais/calais_tagmods.module on line 77.
* warning: array_values() [function.array-values]: The argument should be an array in /var/www/yelvington.com/sites/all/modules/opencalais/calais_tagmods.module on line 78.
* warning: array_diff() [function.array-diff]: Argument #1 is not an array in /var/www/yelvington.com/sites/all/modules/opencalais/calais_tagmods.module on line 77.
* warning: array_values() [function.array-values]: The argument should be an array in /var/www/yelvington.com/sites/all/modules/opencalais/calais_tagmods.module on line 78.
* warning: Invalid argument supplied for foreach() in /var/www/yelvington.com/sites/all/modules/opencalais/calais_tagmods.module on line 99.
* warning: Invalid argument supplied for foreach() in /var/www/yelvington.com/sites/all/modules/opencalais/calais_tagmods.module on line 99.
* warning: Invalid argument supplied for foreach() in /var/www/yelvington.com/sites/all/modules/opencalais/calais_tagmods.module on line 99.
* warning: Invalid argument supplied for foreach() in /var/www/yelvington.com/sites/all/modules/opencalais/calais_tagmods.module on line 99.

yelvington’s picture

Priority: Normal » Critical

Upping priority to critical; this module should NOT be upgraded until this is cleared up.

febbraro’s picture

Can either of you print out the $keywords variable on line 118 of calais.module and tell me what it looks like. From what I can tell, it appears that there is no data coming back from the call to the Calais API module.

Also @jjcheno how are you trying to revert to the earlier module? You can't just unpack the older version on top of the new version, I had moved the hook_requirements function from calais_api.module to the calais_api.install file that previously did not exist.

febbraro’s picture

Assigned: Unassigned » febbraro
jjcheno’s picture

Is this what you are looking for?
copied from my working-live calais.module

#######

$keywords = $calais->analyzeXML($node->title, $body, $date);

if (sizeof($keywords) > 0) {
db_query("DELETE FROM {calais_term_node} WHERE nid=%d", $node->nid);
}

module_invoke_all('calais_preprocess', $node, $keywords);

$vocabularies = calais_get_entity_vocabularies($node->type);

foreach ($keywords as $cat => $metadata) {
$vid = $vocabularies[$cat];

foreach ($metadata->terms as $term) {
calais_associate_term($vid, $term, $node);
calais_populate_term_guid($vid, $term);
if ( ($process_type == CALAIS_PROCESS_AUTO || ($process_type == CALAIS_PROCESS_AUTO_ONCE && $op == "insert"))
&& round($term->relevance * 1000) >= round($threshold * 1000)) {
calais_assign_to_node($vid, $term, $node);
}
}
}

module_invoke_all('calais_postprocess', $node, $keywords);

#############

regards, Jim

febbraro’s picture

I meant could you add a debug statement on line 118, something like

   print "<pre>" . print_r($keywords, true) . "</pre>";

This will help me narrow down where the error is cropping up.

Thanks, sorry for the troubles.

jjcheno’s picture

That is too Funny shows you what I know:) my bio, years spent as telephone repairman 22. years spent as C++ PHP web scripting Guru 0.0
Too Funny the boy are gonna have fun with this one.

Anyway... lets try that again
added the above statement to line 118 of calais.module, ran update.php, edited a post, hit save this is the output.

###########

stdClass Object
(
[Technology] => CalaisMetadata Object
(
[guid] => http://s.opencalais.com/1/type/em/e/Technology
[type] => Technology
[terms] => Array
(
[http://d.opencalais.com/genericHasher-1/ec9b1c63-dad3-301c-a13d-4e40104c... => CalaisTerm Object
(
[guid] => http://d.opencalais.com/genericHasher-1/ec9b1c63-dad3-301c-a13d-4e40104c...
[value] => same technology
[relevance] => 0.153
)

)

)

[Company] => CalaisMetadata Object
(
[guid] => http://s.opencalais.com/1/type/em/e/Company
[type] => Company
[terms] => Array
(
[http://d.opencalais.com/comphash-1/5694699b-ddb7-37d5-9f10-6ccf8caa0e24] => CalaisTerm Object
(
[guid] => http://d.opencalais.com/comphash-1/5694699b-ddb7-37d5-9f10-6ccf8caa0e24
[value] => Ford motor company
[relevance] => 0.096
)

)

)

[IndustryTerm] => CalaisMetadata Object
(
[guid] => http://s.opencalais.com/1/type/em/e/IndustryTerm
[type] => IndustryTerm
[terms] => Array
(
[http://d.opencalais.com/genericHasher-1/a9482a42-33dd-32d6-baaa-2747a1e6... => CalaisTerm Object
(
[guid] => http://d.opencalais.com/genericHasher-1/a9482a42-33dd-32d6-baaa-2747a1e6...
[value] => chemicals
[relevance] => 0.231
)

[http://d.opencalais.com/genericHasher-1/cddd787e-413b-3b94-8450-9f7dd48b... => CalaisTerm Object
(
[guid] => http://d.opencalais.com/genericHasher-1/cddd787e-413b-3b94-8450-9f7dd48b...
[value] => car dealerships
[relevance] => 0.206
)

[http://d.opencalais.com/genericHasher-1/c82d8b02-61bb-3d24-a397-e289b4fa... => CalaisTerm Object
(
[guid] => http://d.opencalais.com/genericHasher-1/c82d8b02-61bb-3d24-a397-e289b4fa...
[value] => car care
[relevance] => 0.206
)

[http://d.opencalais.com/genericHasher-1/9bd6b252-60cd-3d76-bca2-a8f9ce62... => CalaisTerm Object
(
[guid] => http://d.opencalais.com/genericHasher-1/9bd6b252-60cd-3d76-bca2-a8f9ce62...
[value] => car treatment
[relevance] => 0.096
)

)

)

[Product] => CalaisMetadata Object
(
[guid] => http://s.opencalais.com/1/type/em/e/Product
[type] => Product
[terms] => Array
(
[http://d.opencalais.com/genericHasher-1/d9382862-b1d6-3434-a6ed-6c6202e1... => CalaisTerm Object
(
[guid] => http://d.opencalais.com/genericHasher-1/d9382862-b1d6-3434-a6ed-6c6202e1...
[value] => Calais
[relevance] => 0.096
)

)

)

[Currency] => CalaisMetadata Object
(
[guid] => http://s.opencalais.com/1/type/em/e/Currency
[type] => Currency
[terms] => Array
(
[http://d.opencalais.com/genericHasher-1/736a403d-157b-3e80-86a7-acc40460... => CalaisTerm Object
(
[guid] => http://d.opencalais.com/genericHasher-1/736a403d-157b-3e80-86a7-acc40460...
[value] => USD
[relevance] => 0.410
)

)

)

)

#############

regards, Jim

jjcheno’s picture

follow up here is the warning generated from the edit of the test post

warning: array_diff() [function.array-diff]: Argument #1 is not an array in /home/chenoweb/public_html/f-150garage.com/modules/opencalais/calais_tagmods.module on line 77.
warning: array_values() [function.array-values]: The argument should be an array in /home/chenoweb/public_html/f-150garage.com/modules/opencalais/calais_tagmods.module on line 78.
warning: array_diff() [function.array-diff]: Argument #1 is not an array in /home/chenoweb/public_html/f-150garage.com/modules/opencalais/calais_tagmods.module on line 77.
warning: array_values() [function.array-values]: The argument should be an array in /home/chenoweb/public_html/f-150garage.com/modules/opencalais/calais_tagmods.module on line 78.
warning: array_diff() [function.array-diff]: Argument #1 is not an array in /home/chenoweb/public_html/f-150garage.com/modules/opencalais/calais_tagmods.module on line 77.
warning: array_values() [function.array-values]: The argument should be an array in /home/chenoweb/public_html/f-150garage.com/modules/opencalais/calais_tagmods.module on line 78.
warning: array_diff() [function.array-diff]: Argument #1 is not an array in /home/chenoweb/public_html/f-150garage.com/modules/opencalais/calais_tagmods.module on line 77.
warning: array_values() [function.array-values]: The argument should be an array in /home/chenoweb/public_html/f-150garage.com/modules/opencalais/calais_tagmods.module on line 78.
warning: array_diff() [function.array-diff]: Argument #1 is not an array in /home/chenoweb/public_html/f-150garage.com/modules/opencalais/calais_tagmods.module on line 77.
warning: array_values() [function.array-values]: The argument should be an array in /home/chenoweb/public_html/f-150garage.com/modules/opencalais/calais_tagmods.module on line 78.
warning: Invalid argument supplied for foreach() in /home/chenoweb/public_html/f-150garage.com/modules/opencalais/calais_tagmods.module on line 99.
warning: Invalid argument supplied for foreach() in /home/chenoweb/public_html/f-150garage.com/modules/opencalais/calais_tagmods.module on line 99.
warning: Invalid argument supplied for foreach() in /home/chenoweb/public_html/f-150garage.com/modules/opencalais/calais_tagmods.module on line 99.
warning: Invalid argument supplied for foreach() in /home/chenoweb/public_html/f-150garage.com/modules/opencalais/calais_tagmods.module on line 99.
warning: Invalid argument supplied for foreach() in /home/chenoweb/public_html/f-150garage.com/modules/opencalais/calais_tagmods.module on line 99.
warning: Invalid argument supplied for foreach() in /home/chenoweb/public_html/f-150garage.com/modules/opencalais/calais.module on line 126.
warning: Invalid argument supplied for foreach() in /home/chenoweb/public_html/f-150garage.com/modules/opencalais/calais.module on line 126.
warning: Invalid argument supplied for foreach() in /home/chenoweb/public_html/f-150garage.com/modules/opencalais/calais.module on line 126.
warning: Invalid argument supplied for foreach() in /home/chenoweb/public_html/f-150garage.com/modules/opencalais/calais.module on line 126.
warning: Invalid argument supplied for foreach() in /home/chenoweb/public_html/f-150garage.com/modules/opencalais/calais.module on line 126.
warning: Cannot modify header information - headers already sent by (output started at /home/chenoweb/public_html/f-150garage.com/modules/opencalais/calais.module:118) in /home/chenoweb/public_html/f-150garage.com/artwork/modules/core/classes/GalleryPhpVm.class on line 142.

############

Jim

febbraro’s picture

Can you try turning off the tagmods module and then do an update of a node to see if things are working?

Also can you contact me via my contact tab of my user page, http://drupal.org/user/43670. It might help if we can get together on IM or more directly to help work through this issue.

febbraro’s picture

Oh actually, I think I see what might be going on.....

Ok I moved the calais_tagmods module from the root directory to a folder under contrib/ but it appears that you are still loading the old module. Can you disable the calais modules, move the opencalais directory away to /tmp or something, unpack the new 2.0 release and then turn the modules on that is in the new folder? You are using a version of the calais_tagmods module that is incompatible with the data structure that is now returned via the API module.

jjcheno’s picture

OK, I see the changed file structure. here is what I did.

A)Disabled 'Calias Tag Modifier' Module.
B)Removed these 2 files from the root of /opencalais. 1. calais_tagmods.info 2. calais_tagmods.module
C)ran update.php (got a visual indicator of successful update of files in question)

That did it! verified by editing an existing post. it got retaged, also checked by adding a new post via external blogging component(FireFox 3. scribefire extension) works great!

Febbraro,Thank you for the Outstanding Fast and accurate support,

will keep you posted,

Sincerely,
Jim Chenoweth

febbraro’s picture

Status: Active » Fixed

That is great.

I did not think of that consequence of moving the module files. I will work that into a README/INSTALL/UPGRADE file of some sort.

I was considering starting a "gallery" of Drupal sites using OpenCalais, do you have a URL or two you'd like to seed the gallery with?

Good luck with your site,
Frank

jjcheno’s picture

Sure, these 2 show off Calais pretty well,

http://f-150garage.com -Ford truck site-

http://chenoco.com -Alternative Energy-

Thanks,
Jim

Anonymous’s picture

Status: Fixed » Closed (fixed)

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