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.

eZ debug

Timing: Jan 19 2025 12:44:31
Script start
Timing: Jan 19 2025 12:44:31
Module start 'layout'
Timing: Jan 19 2025 12:44:31
Module start 'content'
Timing: Jan 19 2025 12:44:32
Module end 'content'
Timing: Jan 19 2025 12:44:32
Script end

Main resources:

Total runtime1.0037 sec
Peak memory usage4,096.0000 KB
Database Queries65

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0071 589.1719152.6250
Module start 'layout' 0.00710.0025 741.796939.4453
Module start 'content' 0.00960.9927 781.2422603.8906
Module end 'content' 1.00230.0014 1,385.132816.1563
Script end 1.0037  1,401.2891 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00350.3488160.0002
Check MTime0.00140.1401160.0001
Mysql Total
Database connection0.00120.122010.0012
Mysqli_queries0.938393.4811650.0144
Looping result0.00080.0817630.0000
Template Total0.958995.520.4794
Template load0.00220.218220.0011
Template processing0.956795.316820.4783
Template load and register function0.00020.018910.0002
states
state_id_array0.00360.357110.0036
state_identifier_array0.00150.144920.0007
Override
Cache load0.00180.1835350.0001
Sytem overhead
Fetch class attribute can translate value0.00070.069830.0002
Fetch class attribute name0.00120.123770.0002
XML
Image XML parsing0.00170.169730.0006
class_abstraction
Instantiating content class attribute0.00000.002280.0000
General
dbfile0.00120.1153230.0001
String conversion0.00000.000940.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
5content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
8content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
4content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
3content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 22
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs