Closed GoogleCodeExporter closed 9 years ago
I also noticed that this doesn't come initially. Try creating about 3-4
Contents and it gets thrown.
I mentioned that this error comes with Postgres, but it also comes with MySQL.
Original comment by davyd...@gmail.com
on 14 Jul 2010 at 1:31
Any updates? It would save me a lot of trouble if this issue would be resolved.
Original comment by davyd...@gmail.com
on 26 Jul 2010 at 10:59
Offhand it looks like you have multiple content objects with the same
archetypes UID in plone, which seems strange. If you query the archtypes UID
from the database that's given in the traceback it would be interesting to
validate that what is serialized is indeed the news event path that's in the
traceback.
Looking at the content type in the traceback, it seems to be some sort of peer
content type, which might the issue, namely that its ATPeerFolder.. I haven't
see this before, but if it behaves as though it has the same archetypes UID as
another content object then that would explain the constraint violation. Its
not clear to me off hand what use such a peer would have, but i can say that's
its violating a basic tenent of contentmirror and plone, namely that a content
object's archetypes UID is unique, and that's its not supported. If you wanted
to you could setup a serializer for this content type that either didn't insert
anything into the database or inserted something with a unique UID that's
specific to the peer instance (path hash would work).
Original comment by kapilt@gmail.com
on 27 Jul 2010 at 1:50
doh.. sorry i totally missed that atfolderpeer is the contentmirror generated
peer. I'm still uncertain why there would be an integrity error on UID unless
there is a duplicate content UID in plone. It would be good to have a sanity
check that the uid that matches in the database has the same path as the object
being referenced here.
Original comment by kapilt@gmail.com
on 27 Jul 2010 at 9:40
I've been playing with it a little more. Here is what I did, and the errors I
got:
1. Created new folder called "Test Folder"
2. Renamed test folder as "Dummy Folder" and got error message for
IntegrityCheck Error. Folder still remained as "Test Folder"
Inspecting it further, I saw that it was using this UID: 9e159e6ccec77133ddebfc2e3e9953fe
3. Tried creating an image content inside "Test Folder". Same IntegritCheck
Error was thrown with the same UID: 9e159e6ccec77133ddebfc2e3e9953fe
So the UID isn't being newly generated.
Original comment by davyd...@gmail.com
on 28 Jul 2010 at 5:42
So it looks like the event subscriber was generating an add operation in
response to modified/workflow events instead of an update operation. Looks like
the regression was from mid-april 2010. I fixed this in Revision 228, and added
several tests to verify the operations generated for each event.
Original comment by kapilt@gmail.com
on 28 Jul 2010 at 12:04
Original comment by kapilt@gmail.com
on 28 Jul 2010 at 12:12
I'm using 0.7, and get:
2011-07-29T17:14:24 ERROR Zope.SiteErrorLog 1311952464.650.737942450127
https://www.example.com/portal_factory/Event/event.2011-07-29.2293407898/atct_ed
it
Traceback (innermost last):
Module ZPublisher.Publish, line 135, in publish
Module Zope2.App.startup, line 291, in commit
Module transaction._manager, line 93, in commit
Module transaction._transaction, line 316, in commit
Module transaction._transaction, line 366, in _callBeforeCommitHooks
Module ore.contentmirror.operation, line 212, in flush
Module sqlalchemy.orm.session, line 1388, in flush
Module sqlalchemy.orm.session, line 1469, in _flush
Module sqlalchemy.orm.unitofwork, line 302, in execute
Module sqlalchemy.orm.unitofwork, line 446, in execute
Module sqlalchemy.orm.mapper, line 1878, in _save_obj
Module sqlalchemy.engine.base, line 1191, in execute
Module sqlalchemy.engine.base, line 1271, in _execute_clauseelement
Module sqlalchemy.engine.base, line 1302, in __execute_context
Module sqlalchemy.engine.base, line 1401, in _cursor_execute
Module sqlalchemy.engine.base, line 1394, in _cursor_execute
Module sqlalchemy.engine.default, line 299, in do_execute
IntegrityError: (IntegrityError) duplicate key value violates unique constraint
"content_content_uid_idx"
"INSERT INTO content (content_id, id, content_uid, object_type, status, portal_type, folder_position, container_id, path, relative_path, title, description, subject, location, contributors, creators, creation_date, modification_date, effectivedate, expirationdate, language, rights, excludefromnav) VALUES (nextval('content_sequence'), %(id)s, %(content_uid)s, %(object_type)s, %(status)s, %(portal_type)s, %(folder_position)s, %(container_id)s, %(path)s, %(relative_path)s, %(title)s, %(description)s, %(subject)s, %(location)s, %(contributors)s, %(creators)s, %(creation_date)s, %(modification_date)s, %(effectivedate)s, %(expirationdate)s, %(language)s, %(rights)s, %(excludefromnav)s) RETURNING content.content_id" {'contributors': '', 'object_type': 'ATEventPeer', 'creation_date': datetime.datetime(2011, 7, 29, 17, 14, 24, 255571), 'id': '2018the-new-energy-era2019', 'subject': '', 'modification_date': datetime.datetime(2011, 7, 29, 17, 14, 24, 568288), 'title': '\xe2\x80\x98The New Energy Era\xe2\x80\x99 ', 'folder_position': 249, 'location': 'West-Cork, Ireland', 'excludefromnav': False, 'status': 'private', 'description': '', 'effectivedate': None, 'content_uid': '03f7602407a7077a32d09390b2c8a091', 'portal_type': 'Event', 'container_id': None, 'relative_path': '2018the-new-energy-era2019', 'path': '/01/mnt/Plone/2018the-new-energy-era2019', 'language': 'en', 'rights': '', 'expirationdate': None, 'creators': 'woestmann'}
Searching the database does not reveal an object with this UID, however:
contentmirror=# select * from content where content_uid =
'03f7602407a7077a32d09390b2c8a091';
content_id | id | content_uid | object_type | status | portal_type | folder_position | container_id | path | relative_path | title | description | subject | location | contributors | creators | creation_date | modification_date | effectivedate | expirationdate | language | rights | excludefromnav
------------+----+-------------+-------------+--------+-------------+-----------
------+--------------+------+---------------+-------+-------------+---------+---
-------+--------------+----------+---------------+-------------------+----------
-----+----------------+----------+--------+----------------
(0 rows)
Original comment by d...@tonimueller.org
on 29 Jul 2011 at 6:28
Original issue reported on code.google.com by
davyd...@gmail.com
on 14 Jul 2010 at 1:01