Transaction problems after switching server

Author Message

Espen Pedersen

Monday 27 February 2006 11:43:28 am

Hi!

I've reinstalled an eZ site on a new server, by doing the following:

- installing a new plain eZ installastion and adding my sitestyle
- dumped the db from the old server and imported it again on the new server

Frontend works perfectly, but when I log into admin and try creating content, I receive the following error:

<b>
Fatal error: A database transaction in eZ publish failed.

The current execution was stopped to prevent further problems.
You should contact the System Administrator of this site with the information on this page.
The current transaction ID is TRANSID-dc80a3e389cfc9b9c4db182fa79d1495 and has been logged.
Please include the transaction ID and the current URL when contacting the system administrator.
</b>

Turning on debug gives me this:

<b>Notice: eZMySQLDB::query(1 rows, 0.708 ms) query number per page:15 Feb 27 2006 19:36:54

INSERT INTO ezcontentobject_attribute (contentobject_id, version, language_code, contentclassattribute_id, attribute_original_id, sort_key_int, sort_key_string, data_type_string, data_text, data_int, data_float) VALUES('0', '1', 'nor-NO', '1', '0', '0', 'new article', 'ezstring', 'New article', NULL, '0.000000')

Notice: eZMySQLDB::query(-1 rows, 0.459 ms) query number per page:16 Feb 27 2006 19:36:54

INSERT INTO ezcontentobject_attribute (contentobject_id, version, language_code, contentclassattribute_id, attribute_original_id, sort_key_int, sort_key_string, data_type_string, data_text, data_int, data_float) VALUES('0', '1', 'nor-NO', '152', '0', '0', '', 'ezstring', '', NULL, '0.000000')

Error: eZMySQLDB Feb 27 2006 19:36:54

Query error: Duplicate entry '0-1' for key 1. Query: INSERT INTO ezcontentobject_attribute (contentobject_id, version, language_code, contentclassattribute_id, attribute_original_id, sort_key_int, sort_key_string, data_type_string, data_text, data_int, data_float) VALUES('0', '1', 'nor-NO', '152', '0', '0', '', 'ezstring', '', NULL, '0.000000')
</b>

I'm not sure how I can resolve this, any ideas?

Ɓukasz Serwatka

Tuesday 28 February 2006 12:09:44 am

Hi Espen,

You have errors in your database, missing auto increment on id fields. Run "Check database" from Setup-> Upgrade Check.

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

Espen Pedersen

Tuesday 28 February 2006 10:53:53 am

Thanks :)

I guess that's it, unfortunately I don't have permissions to alter tables, but I'll try emailing my ISP.

One thing tough, I don't really understand how this has happended?

I used mysqldump --lock-tables --opt --compatible=mysql40 when creating the dump. And I have done that before with success.

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 19:18:09
Script start
Timing: Jan 18 2025 19:18:09
Module start 'layout'
Timing: Jan 18 2025 19:18:09
Module start 'content'
Timing: Jan 18 2025 19:18:10
Module end 'content'
Timing: Jan 18 2025 19:18:10
Script end

Main resources:

Total runtime0.7347 sec
Peak memory usage4,096.0000 KB
Database Queries57

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0094 588.1641152.6563
Module start 'layout' 0.00940.0052 740.820339.5078
Module start 'content' 0.01460.7186 780.3281554.4766
Module end 'content' 0.73320.0015 1,334.804712.1094
Script end 0.7347  1,346.9141 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00340.4629160.0002
Check MTime0.00130.1804160.0001
Mysql Total
Database connection0.00070.090810.0007
Mysqli_queries0.671391.3681570.0118
Looping result0.00050.0706550.0000
Template Total0.692094.220.3460
Template load0.00220.299620.0011
Template processing0.689893.891420.3449
Template load and register function0.00010.013810.0001
states
state_id_array0.00120.166710.0012
state_identifier_array0.00140.196020.0007
Override
Cache load0.00190.2579350.0001
Sytem overhead
Fetch class attribute can translate value0.00060.076120.0003
Fetch class attribute name0.00170.227850.0003
XML
Image XML parsing0.00110.148520.0005
class_abstraction
Instantiating content class attribute0.00000.001160.0000
General
dbfile0.00130.1837240.0001
String conversion0.00000.001840.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
3content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
3content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
7content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
4content/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: 19
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs