Forums / Developer / updatesearchindex.php fails - a bug?

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!!!

eZ debug

Timing: Jan 18 2025 19:20:53
Script start
Timing: Jan 18 2025 19:20:53
Module start 'content'
Timing: Jan 18 2025 19:20:54
Module end 'content'
Timing: Jan 18 2025 19:20:54
Script end

Main resources:

Total runtime1.7265 sec
Peak memory usage4,096.0000 KB
Database Queries209

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0093 588.8516180.8281
Module start 'content' 0.00931.5446 769.6797620.8047
Module end 'content' 1.55390.1725 1,390.4844345.0547
Script end 1.7264  1,735.5391 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00480.2765210.0002
Check MTime0.00190.1119210.0001
Mysql Total
Database connection0.00170.096710.0017
Mysqli_queries1.626094.17782090.0078
Looping result0.00250.14542070.0000
Template Total1.690297.920.8451
Template load0.00210.124120.0011
Template processing1.688197.775820.8440
Template load and register function0.00010.005410.0001
states
state_id_array0.00100.055710.0010
state_identifier_array0.00170.099520.0009
Override
Cache load0.00190.1092530.0000
Sytem overhead
Fetch class attribute can translate value0.00170.100130.0006
Fetch class attribute name0.00140.0826100.0001
XML
Image XML parsing0.00130.075030.0004
class_abstraction
Instantiating content class attribute0.00000.0023160.0000
General
dbfile0.00200.1181330.0001
String conversion0.00000.000330.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

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
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/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