eZ Community » Forums » Developer » updatesearchindex.php fails - a bug?
expandshrink

updatesearchindex.php fails - a bug?

updatesearchindex.php fails - a bug?

Friday 16 September 2005 6:53:57 am - 7 replies

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

Friday 16 September 2005 8:10:32 am

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.

Friday 16 September 2005 11:46:50 am

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

Friday 16 September 2005 12:19:05 pm

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!

Modified on Friday 16 September 2005 12:19:53 pm by Peter Schnuerer

Monday 19 September 2005 8:27:23 am

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

Thanx
Peter

Monday 19 September 2005 8:45:57 am

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.

Monday 19 September 2005 11: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

Monday 19 September 2005 3:19:54 pm

[solved]

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

THANX!!!

expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from