How to clean de database ?

Author Message

Seb Gaillard

Wednesday 24 June 2009 9:26:14 am

I have already open a post (http://ez.no/developer/forum/developer/fatal_error_in_runcronjobs_php_and_updateniceurls_php) with the same problem. Maybe the title was not correct...

I have a question regarding a problem I'm having. I think that my database
is corrupted (following a failed transaction???). So here's the explanation:

When I launch: php runcronjobs.php frequent
I get the following error when the notification script is launched:

Fatal error: Call to a member function attribute() on a non-object in
/var/www/psycho/kernel/classes/notification/handler/ezsubtree/ezsubtreehandler.php on line 128
Fatal error: eZ Publish did not finish its request. The execution of eZ Publish was abruptly ended, the debug output is present below.

When I launch:
php bin/php/updateniceurls.php, I get:

Fatal error: Call to a member function attribute() on a non-object in
/var/www/psycho/kernel/classes/ezcontentobjecttreenode.php on line 3960

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

So I went and posted from var_dump (in
\kernel\classes\notification\eznotificationeventfilter.php and kernel\classes\ezcontentobjecttreenode.php) to try and understand which scripts were posing a problem. It appears that in both cases, it's the same object that's causing the problems
(ContentObjectID = 17444) :

FOR NOTIFICATION.PHP

object(eZContentObjectTreeNode)#14007 (22) {
 ["CurrentLanguage"]=>
 bool(false)
 ["Name"]=>
 string(1) "1"
 ["ClassIdentifier"]=>
 string(17) "psycho_paragraphe"
 ["ClassName"]=>
 string(17) "Psycho Paragraphe"
 ["PersistentDataDirty"]=>
 bool(false)
 ["NodeID"]=>
 string(5) "16990"
 ["ParentNodeID"]=>
 string(5) "16881"
 ["MainNodeID"]=>
 string(5) "16990"
 ["ContentObjectID"]=>
 string(5) "17444"
 ["ContentObjectVersion"]=>
 string(1) "2"
 ["ContentObjectIsPublished"]=>
 string(1) "1"
 ["Depth"]=>
 string(1) "7"
 ["SortField"]=>
 string(1) "1"
 ["SortOrder"]=>
 string(1) "1"
 ["Priority"]=>
 string(1) "0"
 ["ModifiedSubNode"]=>
 string(10) "1239290952"
 ["PathString"]=>
 string(37) "/1/2/147/210/38781/38782/16881/16990/"
 ["PathIdentificationString"]=>
 string(77) 
"beaute/corps/complexes/articles_et_dossiers/c_est_l_ete_sublimez_votre_peau
/1"
 ["RemoteID"]=>
 string(32) "4f698e48d23151d3d96987eb9959d03d"
 ["IsHidden"]=>
 string(1) "0"
 ["IsInvisible"]=>
 string(1) "0"
 ["ContentObject"]=>
 object(eZContentObject)#14010 (23) {
   ["ID"]=>
   string(5) "17444"
   ["Name"]=>
   string(1) "1"
   ["CurrentLanguage"]=>
   string(6) "fre-FR"
   ["ClassName"]=>
   string(17) "Psycho Paragraphe"
   ["ClassIdentifier"]=>
   string(17) "psycho_paragraphe"
   ["DataMap"]=>
   array(0) {
   }
   ["ContentActionList"]=>
   bool(false)
   ["ContentObjectAttributes"]=>
   array(0) {
   }
   ["MainNodeID"]=>
   bool(false)
   ["InputRelationList"]=>
   array(0) {
   }
   ["PersistentDataDirty"]=>
   bool(false)
   ["SectionID"]=>
   string(1) "1"
   ["OwnerID"]=>
   string(3) "370"
   ["ClassID"]=>
   string(2) "60"
   ["IsPublished"]=>
   string(1) "0"
   ["Published"]=>
   string(10) "1233821600"
   ["Modified"]=>
   string(10) "1239290952"
   ["CurrentVersion"]=>
   string(1) "2"
   ["Status"]=>
   string(1) "1"
   ["LanguageMask"]=>
   string(1) "2"
   ["InitialLanguageID"]=>
   string(1) "2"
   ["RemoteID"]=>
   NULL
   ["Permissions"]=>
   array(0) {
   }
 }
}

FOR UPDATENICEURLS.PHP

+object(eZContentObjectTreeNode)#419 (22) {
 ["CurrentLanguage"]=>
 string(6) "fre-FR"
 ["Name"]=>
 string(1) "1"
 ["ClassIdentifier"]=>
 string(17) "psycho_paragraphe"
 ["ClassName"]=>
 string(17) "Psycho Paragraphe"
 ["PersistentDataDirty"]=>
 bool(false)
 ["NodeID"]=>
 string(5) "16990"
 ["ParentNodeID"]=>
 string(5) "16881"
 ["MainNodeID"]=>
 string(5) "16990"
 ["ContentObjectID"]=>
 string(5) "17444"
 ["ContentObjectVersion"]=>
 string(1) "2"
 ["ContentObjectIsPublished"]=>
 string(1) "1"
 ["Depth"]=>
 string(1) "7"
 ["SortField"]=>
 string(1) "1"
 ["SortOrder"]=>
 string(1) "1"
 ["Priority"]=>
 string(1) "0"
 ["ModifiedSubNode"]=>
 string(10) "1239290952"
 ["PathString"]=>
 string(37) "/1/2/147/210/38781/38782/16881/16990/"
 ["PathIdentificationString"]=>
 string(77) "beaute/corps/complexes/articles_et_dossiers/c_est_l_ete_sublimez_votre_peau
/1"
 ["RemoteID"]=>
 string(32) "4f698e48d23151d3d96987eb9959d03d"
 ["IsHidden"]=>
 string(1) "0"
 ["IsInvisible"]=>
 string(1) "0"
 ["ContentObject"]=>
 object(eZContentObject)#420 (23) {
   ["ID"]=>
   string(5) "17444"
   ["Name"]=>
   string(1) "1"
   ["CurrentLanguage"]=>
   string(6) "fre-FR"
   ["ClassName"]=>
   string(17) "Psycho Paragraphe"
   ["ClassIdentifier"]=>
   string(17) "psycho_paragraphe"
   ["DataMap"]=>
   array(0) {
   }
   ["ContentActionList"]=>
   bool(false)
   ["ContentObjectAttributes"]=>
   array(0) {
   }
   ["MainNodeID"]=>
   bool(false)
   ["InputRelationList"]=>
   array(0) {
   }
   ["PersistentDataDirty"]=>
   bool(false)
   ["SectionID"]=>
   string(1) "1"
   ["OwnerID"]=>
   string(3) "370"
   ["ClassID"]=>
   string(2) "60"
   ["IsPublished"]=>
   string(1) "0"
   ["Published"]=>
   string(10) "1233821600"
   ["Modified"]=>
   string(10) "1239290952"
   ["CurrentVersion"]=>
   string(1) "2"
   ["Status"]=>
   string(1) "1"
   ["LanguageMask"]=>
   string(1) "2"
   ["InitialLanguageID"]=>
   string(1) "2"
   ["RemoteID"]=>
   NULL
   ["Permissions"]=>
   array(0) {
   }
 }
}

When I try to access this object via the admin interface
(http://admin.sgaillard.psycho.fr/.../corps/complexes/articles_et_dossier
s/c_est_l_ete_sublimez_votre_peau/1
<http://admin.sgaillard.psycho.fr/.../corps/complexes/articles_et_dossier
s/c_est_l_ete_sublimez_votre_peau/1>),

I get an error /kernel(20)
I thought maybe this object featured in the trashcan, but:
SELECT * FROM `ezcontentobject_trash` WHERE `contentobject_id` = 17444
doesn't give any return

Ez does not reccomend modifying the data found in the database tables. So
I'm not intending to manually delete this object.

Does anyone know of a script that would rectify this problem. Thanks in
advance.

Seb

John Moritz

Wednesday 24 June 2009 11:34:45 pm

Which version do you use?

If it´s 4.1.2 take a look at this:
http://ez.no/download/ez_publish/changelogs/ez_publish_4_1/changelog_4_1_2_to_4_1_3
http://issues.ez.no/15005

Seb Gaillard

Thursday 25 June 2009 12:58:20 am

Hi John,

I use the 4.0.1.
I will see your link anyway.
Thank's for your reply,

Seb

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 11:26:58
Script start
Timing: Jan 18 2025 11:26:58
Module start 'layout'
Timing: Jan 18 2025 11:26:58
Module start 'content'
Timing: Jan 18 2025 11:26:58
Module end 'content'
Timing: Jan 18 2025 11:26:58
Script end

Main resources:

Total runtime0.0297 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0078 589.0469152.6250
Module start 'layout' 0.00780.0037 741.671939.4453
Module start 'content' 0.01160.0158 781.117297.3359
Module end 'content' 0.02730.0023 878.453138.3047
Script end 0.0296  916.7578 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.003612.2840140.0003
Check MTime0.00134.4347140.0001
Mysql Total
Database connection0.00103.416210.0010
Mysqli_queries0.003611.983630.0012
Looping result0.00000.094810.0000
Template Total0.00186.010.0018
Template load0.00093.025810.0009
Template processing0.00092.911010.0009
Override
Cache load0.00062.163110.0006
General
dbfile0.003812.906580.0005
String conversion0.00000.036140.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs