Forums / Developer / How to clean de database ?

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

eZ debug

Timing: Jan 31 2025 05:33:18
Script start
Timing: Jan 31 2025 05:33:18
Module start 'content'
Timing: Jan 31 2025 05:33:18
Module end 'content'
Timing: Jan 31 2025 05:33:18
Script end

Main resources:

Total runtime0.3355 sec
Peak memory usage2,048.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0064 587.9297180.8359
Module start 'content' 0.00640.0168 768.7656101.8828
Module end 'content' 0.02320.3123 870.6484541.2734
Script end 0.3354  1,411.9219 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00371.0881200.0002
Check MTime0.00140.4206200.0001
Mysql Total
Database connection0.00070.219410.0007
Mysqli_queries0.269880.42331410.0019
Looping result0.00160.47281390.0000
Template Total0.311692.910.3116
Template load0.00130.392310.0013
Template processing0.310392.487710.3103
Override
Cache load0.00080.248310.0008
Sytem overhead
Fetch class attribute can translate value0.00070.212010.0007
XML
Image XML parsing0.00030.087310.0003
General
dbfile0.00692.0603200.0003
String conversion0.00000.001730.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
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0002 secs