Hi,
When indexing with Lucene I get the following error:

An error occurred. /~nativemu/batch?id=4&op=do
Fatal error: Cannot pass parameter 3 by reference in /home/nativemu/public_html/sites/all/modules/luceneapi/contrib/luceneapi_node/luceneapi_node.index.inc on line 155

Any ideas what this might be?

Many thanks, Joe

Comments

cpliakas’s picture

Status: Active » Closed (won't fix)

Hi Joe.

Respectfully marking this as won't fix, because it is most likely not an issue with Search Lucene API. However, I can help you debug. It appears that another module isn't implementing hook_nodeapi() correctly. In it's hook implementation, the third parameter will have an ampersand in front of the variable meaning it expects a reference. Search Lucene API passes FALSE to the hook_nodeapi() implementation, and since FALSE is not a variable PHP freaks out bcause it can only reference variables. If you take a look at http://api.drupal.org/api/function/hook_nodeapi/6, you will see the third param should not be passed by reference. I would identify the offending module, and submit a patch if is a contrib.

Sorry for you issues, and thanks for posting,
Chris

cpliakas’s picture

To easily identify the module, add drupal_set_message($function); below line 154 right before $result = $function($node, 'update index', FALSE, FALSE); is called, and the last module in the message will be where you want to look.

Thanks,
Chris

joecanti’s picture

Thanks for giving this your attention Chris,

I did what you suggested and found it to be the nodemap module - after disabling this the indexing worked great. I'm not sure how to write patches yet, so i'll put an issue in its queue. Meanwhile is there any way to temporarily stop the nodemap nodeapi being indexed or does lucene simply run through all nodeapi's?

Thanks for your help, Joe

joecanti’s picture

Status: Closed (won't fix) » Fixed

Hi,

To summarize - this wasnt a problem with luceneapi - it was a problem with how nodeapi was being used in another module - in my case nodemap. The patch to be applied to the nodemap.module, kindly supplied by chris, can be found here:

http://drupal.org/node/862514#comment-3240644

Thanks again Chris!

Joe

cpliakas’s picture

Thanks for reporting back!

Status: Fixed » Closed (fixed)

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