Database Integrity Question

Author Message

Russell Michell

Thursday 04 June 2009 6:54:51 pm

Hi all,

I'm not sure how long this issue has been around for in my install (4.0.1) but I've only just noticed that upon saving/previewing one of my content objects (Folder class, object ID 355), I get the message "Object partially saved" (or similar) and that a specific node no longer exists.

When I look in the admin section, in the "Relations" area for the object (355), it says Relations [1], Related Objects [1] but literally nothing beneath that ( See screenshot: http://www.theruss.com/images/screenshot.png ) and no message in error.log.

So how do you delete the reference to the deleted/missing node?

In anycase, I think I tracked down the culprit and wanted to ask everyone else about this before I delete the reference in what I think is the appropriate table:

The ID of the content object with the broken-link to the deleted object is 355, so:

mysql> SELECT * FROM ezcontentobject_link WHERE from_contentobject_id = 355\G;
*************************** 1. row ***************************
contentclassattribute_id: 0
from_contentobject_id: 355
from_contentobject_version: 3
id: 1599
op_code: 0
relation_type: 4
to_contentobject_id: 210
1 row in set (0.00 sec)

Am I right in thinking that 'to_contentobject_id' is a 'foreign key' to ezcontentobject.id? If so then:

mysql> SELECT * FROM ezcontentobject WHERE id = 210;
Empty set (0.00 sec)

Does this mean this is a dead-link in my content object and I can safely delete the entry from ezcontentobject_link? FWIW - I backed up the DB and ran the delete, and the 'Relations' headings went back to normal ("There are no related objects...") I guess I need to know what impact, if any this may have on database integrity.

FWIW Selecting the "Check database consistency", everything is A-OK

Thanks a lot for your time,
Russ

Russell Michell, Wellington, New Zealand.
We're building! http://www.theruss.com/blog/
I'm on Twitter: http://twitter.com/therussdotcom

Believe nothing, consider everything.

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 19 2025 00:08:32
Script start
Timing: Jan 19 2025 00:08:32
Module start 'layout'
Timing: Jan 19 2025 00:08:32
Module start 'content'
Timing: Jan 19 2025 00:08:33
Module end 'content'
Timing: Jan 19 2025 00:08:33
Script end

Main resources:

Total runtime0.9471 sec
Peak memory usage4,096.0000 KB
Database Queries46

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0054 594.8203152.6406
Module start 'layout' 0.00550.0041 747.460939.4766
Module start 'content' 0.00950.9362 786.9375472.9609
Module end 'content' 0.94570.0013 1,259.89848.1484
Script end 0.9470  1,268.0469 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00330.3447160.0002
Check MTime0.00140.1434160.0001
Mysql Total
Database connection0.00080.085110.0008
Mysqli_queries0.900295.0555460.0196
Looping result0.00050.0526440.0000
Template Total0.911796.320.4558
Template load0.00210.217020.0010
Template processing0.909696.048020.4548
Template load and register function0.00010.013710.0001
states
state_id_array0.00090.090010.0009
state_identifier_array0.00140.151420.0007
Override
Cache load0.00170.1779270.0001
Sytem overhead
Fetch class attribute can translate value0.00090.098910.0009
Fetch class attribute name0.00110.118220.0006
XML
Image XML parsing0.00050.053310.0005
class_abstraction
Instantiating content class attribute0.00000.000620.0000
General
dbfile0.00150.1609160.0001
String conversion0.00000.001140.0000
Note: percentages do not add up to 100% because some accumulators overlap

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
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
4content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
3content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 11
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs