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.