I'm getting this error on a search result page on the latest Drupal running on PHP 5.3:
warning: Parameter 1 to comment_nodeapi() expected to be a reference, value given in /Users/kris/Work/Projects/RK_SimplyAsk/dev/includes/module.inc on line 462.
I ran the following command and got the results below it:
$ grep -r "module_invoke('comment', 'nodeapi'" ./
./sites/all/modules/faceted_search/faceted_search_ui.inc: $node->body .= module_invoke('comment', 'nodeapi', $node, 'update index');
So I went to faceted_search_ui.inc and changed this line:
$node->body .= module_invoke('comment', 'nodeapi', $node, 'update index');
to this:
$node->body .= module_invoke('', '', $node, 'update index');
And it worked, though I'm sure that doesn't actually fix the problem, and might lead to other problems related to the displaying of comments in the search results.
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | faceted_search_ui-9133558-1.patch.txt | 923 bytes | j0rd |
Comments
Comment #1
kriskhaira commentedTagged with "PHP 5.3".
Comment #2
botrisConfirming this still to be a problem with 6.x-1.0-beta2
Comment #3
botrisMoving to dev version solved all my php 5.3 and faceted search problems, including this one
Comment #4
zacho commentedMoving to dev did *not* solve this problem for me (6.x-1.x-dev of 2010-Jul-11).
Comment #5
j0rd commentedThis problem still exists in 6.x-1-x-dev as off Feb 11, 2011.
I've create a patch to resolve that issue against the version mentioned above. It's simple enough that you could apply it to any version.
To elaborate on how to encounter this bug. You must have a facetted search view enabled. Enable the keyword block in it. Search under the keyword block. I believe it uses comment counts or something to figure out how relavent a post should be and this is where the code is getting hit. To be honest, I didn't really look into the code, just patched the bug.
See attached patch. Please remove the comments from it and apply to dev.
Comment #6
stroobl commentedThe patch seems to resolve the issue, thanks.
Comment #7
hansrossel commented#5 Solves the problem here too, thanks!
Comment #8
kevstav13 commented#5 fixed my identical error as well. Thanks!
Comment #9
stenjo commentedIn my installation the patch creates a new error when I try to run drush:
Commenting out the added code for the comment_nodeapi() call, creates another error:
This patch definitely does not fix my issue with this error-message.
Commenting out the line calling comment_nodeapi() clears the error, but obviously then I loose something on the way...
Luckily I've not enabled comments on the node types being listed.
Comment #10
stenjo commentedThink the status of this must change.
Comment #11
stenjo commentedI really have to take that back. The patch in #5 actually fixed the problem for me too as soon as I learned to apply the patch correctly.
Sorted now.
Comment #12
echoz commentedAfter server upgrade to php5.3, using 6.x-1.x-dev (2/25), which had another php5.3 fix, resolved faceted search not showing up + another error - then still needed #5 patch for this error, which it fixed. Thanks.
Comment #13
WebmistressM commentedHmm... Im still having problem applying the patch from 5. Using
apply -v patchnamein the module's directory turns up the following: "error: tmp/faceted_search_ui.inc: No such file or directory". Is there a step I may have forgotten?Comment #14
kriskhaira commented@WebmistressM, If you're having a problem applying the patch, why change the status to fixed?
Comment #15
WebmistressM commentedHmm... I saw that it was already marked "closed" and I didnt want to necessarily reopen it as an issue because I am pretty sure its me just not applying the patch right.
Comment #16
ravi.khetri commentedHmm... Problem Solved ...Thanks.
Comment #17
David Lesieur commentedPut back proper status. Patch #5 looks like the way to go.
Comment #18
David Lesieur commentedCommitted, thanks!