Closed (fixed)
Project:
OpenCalais
Version:
6.x-3.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
20 Jul 2010 at 13:40 UTC
Updated:
23 Dec 2011 at 16:50 UTC
Jump to comment: Most recent file
Comments
Comment #1
febbraro commentedWhat version of Drupal and PHP are you using?
Comment #2
arnold_mad commentedSame happens for me with drupal 6.19 PHP 5.3.2-1ubuntu4.2 and calais 6.x-3.5 module when I edit pages.
Comment #3
ddd2500 commentedI have the same trouble but different in php5.3.3-php-fpm
Comment #4
febbraro commentedI can't reproduce this b/c I dont have PHP 5.3 installed anywhere. IF someone can figure how what is going on and provide a patch I would be more than happy to fix it.
Comment #5
JurgenHeiman commentedSee also http://drupal.org/node/728486
Couldn't use the patch because user_view is different.
It has probably something to do with PHP 5.3
Comment #6
michael330 commentedI'm also having the exact same two errors. Looks like the calais_calais_preprocess() error is stopping calais from creating a vocabulary for entities, and the calais_tagmods_calais_preprocess() error prevents the blacklist and substitutions from working correctly.
I am also using PHP 5.3 (with Drupal 6.17)
Anyone have any ideas?
EDIT: I reverted to PHP 5.2.11 and the error message went away.
Comment #7
toddwshaffer commentedI'm running Drupal 6.20 with OpenPublish with Calais on Ubuntu.
I started getting this exact error message on Article/Node creation or modification after upgrading to PHP 5.3 + Pear's Upload Progress module... Michael330 says reverting to PHP 5.2 fixed his problem, but I'd rather see a fix come out for Calais to support 5.3 :)
Comment #8
allan1015 commentedOh my, I have ot revert back from 5.3 to get Calai support
And I loose the upload module support if i do.
this is a bummer
Comment #9
allan1015 commentedApparently an old issue and others mods have been patched , this article says fix is easy but right now its beyond me
http://drupal.org/node/360605
Comment #10
allan1015 commentedIf it helps
It seems this function (calias_tagmods.module)
function calais_tagmods_calais_preprocess($node, &$keywords) {wants keywords as a reference
I think the calling is being done here (calais.module)
module_invoke_all('calais_preprocess', $node, $keywords);However i tried changing to &$keywords and it didnt change anything
Comment #11
liren.zhu commentedSimple fix, attached is a patch.
If no issues, please commit.
Comment #12
Curvemedia commentedThank you patch worked!
Comment #13
allan1015 commentedpatch worked for me - had the issue for some time.
on the latest Calais 6.x-3.x-dev (2011-Feb-25) and patch still needed
Would love to see this committed
Comment #14
febbraro commented#11 is not the right fix. The reason the error went away is that it is no longer calling that hook. user_module_invoke is trying to call hook_user with $op = 'calais_preprocess'. I'm still not using PHP 5.3 anywhere so I can't debug this yet, but I know that the patch in #11 needs to be reworked. Will try to read up on #360605 so we can get the right fix in.
Comment #15
allan1015 commentedDo you need access to a 5.3 setup?
What would you need?
Comment #16
liren.zhu commentedIt's a Drupal 6 Core-PHP 5.3 issue, not a Calais-PHP 5.3 issue. The patch was meant to simply get rid of the error, which works from a user perspective.
This will be an issue for a lot of modules running on Drupal 6 and PHP 5.3. At the same time, some modules will have adopted the same fix, for now. Question is what do you fix, core or modules?
Comment #17
allan1015 commentedJust to be clear, does the warning, or the patch to get rid of the warning, mean tag creation is or isn't happening?
I notice that Calais is always processing every cron run "Processed 25 nodes with Calais",
I am not sure if this means it is retrying and failing, or this is how it works
Doesn't seem Core guys care about fixing this, I don't mind suppressing the message but unclear how it affects Calais tagging overall
Comment #18
Alphabool commentedI'm having the same issue with Calais 6.x-3.5 and PHP 5.3. It does not appear that tag creation is failing as all the nodes I have created generate this error but are still tagged by Calais.
Comment #19
jthomasbailey commentedSubscribing, patch works to hide errors but text fields don't seem to be processed. URLs work most of the time, though.
Comment #20
arpieb commentedI just ran into the same thing on an Ubuntu 10.04 LTS RS Cloudserver running D6.20 and PHP 5.3.2. After looking at what it was trying to do, I modeled the attached patch after the hook_nodepai invocation code as it handles arguments passed by reference properly (and is trying to do the same thing - allow the hook to modify the passed in args).
The patch in #11 is incorrect as it invokes hook_user, which has nothing to do with what the code is trying to do.
I hope this helps someone as it appears to be working on my site now... And since this patch is modeled after a call already existing in the core node.module, it should be fine on any version of PHP supported by D6.
Comment #21
kaustavdm commented#20 arpieb's patch works for me. Using Openpublish on Drupal 6.20 with PHP 5.3 running on Ubuntu server 11.04 64-bit at home and Ubuntu server 10.04 LTS on RackSpace CloudServer.
Comment #22
geerlingguy commentedStill CNR - I'm having this problem after upgrading to 5.3.2 on CentOS 5.6.
Comment #23
febbraro commentedThanks everyone, committed to 6.x-3.x
http://drupalcode.org/project/opencalais.git/commit/65c271b
Comment #24
LR commentedIf I understood, the patch provided in #11 removes the error but causes problems in opencalais.
But I don't see how the one provided in #20 could help since the error concerns the call of the function calais_calais_preprocess from module.inc and the patch modifies the code in calais_process_node.
If the problem is that this line
$result = call_user_func_array($function, $args);
in module.inc calls calais_calais_preprocess with arguments by value where calais_calais_preprocess waits arguments by reference, I don't see how this patch could solve the problem.