updatesearchindex.php : PHP Fatal error

Author Message

Manuel Masiello

Wednesday 01 July 2009 8:52:18 am

Hi,

I have an problem with updatesearchindex.php with eZpublish version 4.0.1

I send this command :

$ php -d memory_limit=128M bin/php/updatesearchindex.php

Starting object re-indexing
Number of objects to index: 2495
...................................................................... 2.81%
...................................................................... 5.61%
...................................................................... 8.42%
...................................................................... 11.22%
......................................PHP Fatal error: Call to a member function contentObjectAttributes() on a non-object in kernel/search/plugins/twsearchengine/twsearchengine.php on line 58

What is wrong ?

Thank for your help,
Manuel

André R.

Wednesday 01 July 2009 10:50:33 am

Unsure, seems to be happening on a line in your own custom search engine( twsearchengine ).

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

Gaetano Giunta

Thursday 02 July 2009 1:20:04 am

The fix might be a simple test for if ( $object !== null) after a line where you fetch $object out of the contents.
As to why you would be trying to fetch an inexisting node / object, though guess:
- concurrency (somebody updates base while you index)
- broken stuff in the base because of tests done while developing
- murphy's laws
- etc...

Principal Consultant International Business
Member of the Community Project Board

Manuel Masiello

Thursday 02 July 2009 3:17:08 am

Ok, I will fix this bug.

@André R. : Thank you. Is it "normal" to have a custom file into kernel directory ?
@Gaetano Giunta : I think ... It's murphy's laws ! Thank you ^^

André R.

Thursday 02 July 2009 4:44:10 am

No, its perfectly possible to place it in extension, see http://projects.ez.no/ezsearchpro for a simple example on how.

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.