| Peter Schnuerer
                                                                                                                             
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     | Thursday 15 September 2005 9:53:57 pm 
                                                                
                                                                 Hi! I want to update may search-index on Exponential 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: Exponential did not finish its request
The execution of Exponential was abruptly ended, the debug output is present below.
>
 
Whats wrong? A bug?Thanx
 Peter
 | 
                                                
                                                                                                                                                        
                                                        | 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! | 
                                                                                                    
                                                        | 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
 |