updatesearchindex.php fails - a bug?

Author Message

Peter Schnuerer

Thursday 15 September 2005 9:53:57 pm

Hi!

I want to update may search-index on ez Publish 3.5.1:

php -C update/common/scripts/updatesearchindex.php

The command above fails with:


> php -C update/common/scripts/updatesearchindex.php
Starting object re-indexing
Number of objects to index: 1177
....................................sh: line 1: pstotext: command not found
sh: line 1: pstotext: command not found
..al lot of pstotext errors...
sh: line 1: pstotext: command not found
.................................. 5.94732370433%
...................................................................... 11.8946474087%
...................................................................... 17.841971113%
...................................................................... 23.7892948173%
...................................................................
Fatal error: Call to a member function on a non-object in /home/www/web19/html/kernel/search/plugins/ezsearchengine/ezsearchengine.php on line 83

Fatal error: eZ publish did not finish its request
The execution of eZ publish was abruptly ended, the debug output is present below.
>

Whats wrong? A bug?
Thanx
Peter

Kristof Coomans

Thursday 15 September 2005 11:10:32 pm

The external program pstotext is used by binary indexing. You can turn is_searchable off for the binary file attributes, or install the needed package.

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org

Peter Schnuerer

Friday 16 September 2005 2:46:50 am

OK I think this will solve the warning about pstotext... but will it help with the fatal error?

Peter Schnuerer

Friday 16 September 2005 3:19:05 am

I disabled pstotext in the binaryfile.ini.
The warnings about pstotext dissapeard - but I still do have the fatal error on line 83...

here comes the code of ezsearchengine.php:

81: eZContentObject::recursionProtectionStart();
82: foreach ( $currentVersion->contentObjectAttribute() as $attribute )
83: {

The error says: Fatal error: Call to a member function on a non-object in /home/www/web19/html/kernel/search/plugins/ezsearchengine/ezsearchengine.php on line 83

Thanx!

Peter Schnuerer

Sunday 18 September 2005 11:27:23 pm

No ideas yet? I do need an urgent solution - please help!

Thanx
Peter

Kristof Coomans

Sunday 18 September 2005 11:45:57 pm

On line 71 of ezsearchengine.php, $currentVersion is set:

$currentVersion =& $contentObject->currentVersion();

This doesn't return an object in your case, but it always should.
I think your database is not consistent anymore. You can try to trace the objects without a current version, by adding this code to ezsearchengine.php right after line 71:

if ( !is_object( $currentVersion ) )
{
    var_dump( $currentVersion );
    var_dump( $contentObject->attribute( 'id' ) );
}

Now you can check the contentobject in the database to see what's wrong.

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org

Peter Schnuerer

Monday 19 September 2005 2:50:46 am

Thanx!

The error-output is

NULL
string(3) "322"

I have made a dump of 'ezcontentobject'-Table where the ID = 322. It says:


# phpMyAdmin SQL Dump
# version 2.5.6
# http://www.phpmyadmin.net
#
# Host: localhost
# Erstellungszeit: 19. September 2005 um 11:42
# Server Version: 4.0.15
# PHP-Version: 4.3.7
# 
# 

# --------------------------------------------------------

#
# Tabellenstruktur für Tabelle `ezcontentobject`
#

CREATE TABLE `ezcontentobject` (
  `contentclass_id` int(11) NOT NULL default '0',
  `current_version` int(11) default NULL,
  `id` int(11) NOT NULL auto_increment,
  `is_published` int(11) default NULL,
  `modified` int(11) NOT NULL default '0',
  `name` varchar(255) default NULL,
  `owner_id` int(11) NOT NULL default '0',
  `published` int(11) NOT NULL default '0',
  `remote_id` varchar(100) default NULL,
  `section_id` int(11) NOT NULL default '0',
  `status` int(11) default '0',
  PRIMARY KEY  (`id`)
) TYPE=MyISAM AUTO_INCREMENT=1709 ;

#
# Daten für Tabelle `ezcontentobject`
#

INSERT INTO `ezcontentobject` VALUES (55, 7, 322, 0, 1118924445, 'AA-019-12-22', 14, 1117627347, 'd9c2c4f97d74004970e097b84ce62bde', 1, 1);

Seems OK so far - isn't it?
Peter

Peter Schnuerer

Monday 19 September 2005 6:19:54 am

[solved]

OK - I deleted the node and reentered it. Everything works fine now!

THANX!!!

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 18 2025 16:23:54
Script start
Timing: Jan 18 2025 16:23:54
Module start 'layout'
Timing: Jan 18 2025 16:23:54
Module start 'content'
Timing: Jan 18 2025 16:23:55
Module end 'content'
Timing: Jan 18 2025 16:23:55
Script end

Main resources:

Total runtime1.1817 sec
Peak memory usage4,096.0000 KB
Database Queries72

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0052 587.9219152.6250
Module start 'layout' 0.00520.0021 740.546939.4609
Module start 'content' 0.00741.1728 780.0078615.7266
Module end 'content' 1.18010.0015 1,395.734420.1563
Script end 1.1816  1,415.8906 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00310.2618160.0002
Check MTime0.00140.1150160.0001
Mysql Total
Database connection0.00060.054210.0006
Mysqli_queries1.097892.8994720.0152
Looping result0.00070.0587700.0000
Template Total1.145096.920.5725
Template load0.00180.152420.0009
Template processing1.143196.737420.5716
Template load and register function0.00010.010810.0001
states
state_id_array0.00120.100510.0012
state_identifier_array0.00140.117120.0007
Override
Cache load0.00160.1349530.0000
Sytem overhead
Fetch class attribute can translate value0.00070.061520.0004
Fetch class attribute name0.00150.1256100.0001
XML
Image XML parsing0.00110.093420.0006
class_abstraction
Instantiating content class attribute0.00000.0032160.0000
General
dbfile0.00100.0840220.0000
String conversion0.00000.000640.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
8content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
8content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
16content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
7content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
5content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 46
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs