New issue 79 by d...@tonimueller.org: ore.contentmirror breaks with empty
Plone 4.0.8
http://code.google.com/p/contentmirror/issues/detail?id=79
What steps will reproduce the problem?
1. Set up a new Plone site (4.0.8):
$ paster create -t plone4_buildout myproject
Run all the buildout steps, start the instance
ADD NO CONTENT!
Shut the instance down
2. Add ore.contentmirror into the mix
After verifying that the site runs, add ore.contentmirror to buildout.cfg
as per instructions, add ore.contentmirror as a development egg into
myproject/src, and re-run buildout
3. Set up the database
$ ./bin/instance run ./bin/mirror-ddl postgresql > schema.sql
Do some fine-tuning to cope with the unwanted syntax
4. Start to mirror, and see the traceback
$ ./bin/instance run ./bin/mirror-bulk Plone > mirror.log 2>&1
See the following result in mirror.log:
2011-09-22 01:02:00 WARNING ZODB.blob (4978) Blob dir
/home/zope/plone/plainplone/var/blobstorage/ has insecure mode setting
/home/zope/plone/plainplone/src/ore.contentmirror/ore/contentmirror/transform.py:50:
SADeprecationWarning:
useexisting is deprecated. Use extend_existing.
*columns)
2011-09-22 01:02:04,064 INFO sqlalchemy.engine.base.Engine select version()
2011-09-22 01:02:04,064 INFO sqlalchemy.engine.base.Engine {}
2011-09-22 01:02:04,078 INFO sqlalchemy.engine.base.Engine select
current_schema()
2011-09-22 01:02:04,078 INFO sqlalchemy.engine.base.Engine {}
2011-09-22 01:02:04,089 INFO sqlalchemy.engine.base.Engine BEGIN (implicit)
2011-09-22 01:02:04,091 INFO sqlalchemy.engine.base.Engine SELECT
content.content_id AS content_content_id, content.id AS content_id_1,
content.content_uid AS content_content_uid, content.object_type AS
content_object_type, content.status AS content_status, content.portal_type
AS content_portal_type, content.folder_position AS content_folder_position,
content.container_id AS content_container_id, content.path AS content_path,
content.relative_path AS content_relative_path, content.title AS
content_title, content.description AS content_description, content.subject
AS content_subject, content.location AS content_location,
content.contributors AS content_contributors, content.creators AS
content_creators, content.creation_date AS content_creation_date,
content.modification_date AS content_modification_date,
content.effectivedate AS content_effectivedate, content.expirationdate AS
content_expirationdate, content.language AS content_language,
content.rights AS content_rights, content.excludefromnav AS
content_excludefromnav
FROM content
WHERE content.content_uid = %(content_uid_1)s
LIMIT %(param_1)s OFFSET %(param_2)s
2011-09-22 01:02:04,091 INFO sqlalchemy.engine.base.Engine {'param_1':
1, 'content_uid_1': '7fe3352c009484298cb943bf0a7d3965', 'param_2': 0}
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "./bin/mirror-bulk", line 220, in <module>
ore.contentmirror.bulk.main()
File "/home/zope/plone/plainplone/src/ore.contentmirror/ore/contentmirror/bulk.py",
line 154, in main
serializer.update()
File "/home/zope/plone/plainplone/src/ore.contentmirror/ore/contentmirror/serializer.py",
line 49, in update
return self.add()
File "/home/zope/plone/plainplone/src/ore.contentmirror/ore/contentmirror/serializer.py",
line 43, in add
self._copy(peer)
File "/home/zope/plone/plainplone/src/ore.contentmirror/ore/contentmirror/serializer.py",
line 97, in _copy
peer.transformer.copy(self.context, peer)
File "/home/zope/plone/plainplone/src/ore.contentmirror/ore/contentmirror/transform.py",
line 54, in copy
for field in self.context.Schema().fields():
File "/home/zope/plone/plainplone/eggs/Products.Archetypes-1.6.6-py2.6.egg/Products/Archetypes/BaseObject.py",
line 821, in Schema
return ImplicitAcquisitionWrapper(ISchema(self), self)
File "/home/zope/plone/plainplone/eggs/zope.site-3.6.1-py2.6.egg/zope/site/hooks.py",
line 95, in adapter_hook
return siteinfo.adapter_hook(interface, object, name, default)
File "/home/zope/plone/plainplone/eggs/archetypes.schemaextender-2.0.4-py2.6.egg/archetypes/schemaextender/extender.py",
line 125, in cachingInstanceSchemaFactory
lookup = site.aq_acquire
AttributeError: 'NoneType' object has no attribute 'aq_acquire'
Forgot to say: I used ore.contentmirror as of SVN HEAD.
Looks like bug with archetypes.schemaextender can you try without the
extender?
Thanks for answering. I would like to try your advice, but don't know how
to do it: archetypes.schemaextender is a part of Plone's KGS, and is being
referenced from Products.CMFPlone's configure.zcml. Simply commenting it
yields another traceback, pointing to that reference. So there is no easy
way for me to rip it out.
Can you please send some advice on how to try without this product?
With Plone 4.1, the problem looks quite similar:
2011-09-22 15:58:05,117 INFO sqlalchemy.engine.base.Engine select version()
2011-09-22 15:58:05,117 INFO sqlalchemy.engine.base.Engine {}
2011-09-22 15:58:05,135 INFO sqlalchemy.engine.base.Engine select
current_schema()
2011-09-22 15:58:05,136 INFO sqlalchemy.engine.base.Engine {}
2011-09-22 15:58:05,158 INFO sqlalchemy.engine.base.Engine BEGIN (implicit)
2011-09-22 15:58:05,162 INFO sqlalchemy.engine.base.Engine SELECT
content.content_id AS content_content_id, content.id AS content_id_1,
content.content_uid AS content_content_uid, content.object_type AS
content_object_type, content.status AS content_status, content.portal_type
AS content_portal_type, content.folder_position AS content_folder_position,
content.container_id AS content_container_id, content.path AS content_path,
content.relative_path AS content_relative_path, content.title AS
content_title, content.description AS content_description, content.subject
AS content_subject, content.location AS content_location,
content.contributors AS content_contributors, content.creators AS
content_creators, content.creation_date AS content_creation_date,
content.modification_date AS content_modification_date,
content.effectivedate AS content_effectivedate, content.expirationdate AS
content_expirationdate, content.language AS content_language,
content.rights AS content_rights, content.excludefromnav AS
content_excludefromnav
FROM content
WHERE content.content_uid = %(content_uid_1)s
LIMIT %(param_1)s OFFSET %(param_2)s
2011-09-22 15:58:05,162 INFO sqlalchemy.engine.base.Engine {'param_1':
1, 'content_uid_1': '4fa62c61-1814-48f3-a62c-7b5ce5d34a4e', 'param_2': 0}
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "./bin/mirror-bulk", line 236, in <module>
ore.contentmirror.bulk.main()
File "/home/zope/plone/plainplone41/src/ore.contentmirror/ore/contentmirror/bulk.py",
line 154, in main
serializer.update()
File "/home/zope/plone/plainplone41/src/ore.contentmirror/ore/contentmirror/serializer.py",
line 49, in update
return self.add()
File "/home/zope/plone/plainplone41/src/ore.contentmirror/ore/contentmirror/serializer.py",
line 43, in add
self._copy(peer)
File "/home/zope/plone/plainplone41/src/ore.contentmirror/ore/contentmirror/serializer.py",
line 97, in _copy
peer.transformer.copy(self.context, peer)
File "/home/zope/plone/plainplone41/src/ore.contentmirror/ore/contentmirror/transform.py",
line 54, in copy
for field in self.context.Schema().fields():
File "/home/zope/plone/plainplone41/eggs/Products.Archetypes-1.7.6-py2.6.egg/Products/Archetypes/BaseObject.py",
line 821, in Schema
return ImplicitAcquisitionWrapper(ISchema(self), self)
File "/home/zope/plone/plainplone41/eggs/zope.component-3.9.5-py2.6.egg/zope/component/hooks.py",
line 104, in adapter_hook
return siteinfo.adapter_hook(interface, object, name, default)
File "/home/zope/plone/plainplone41/eggs/archetypes.schemaextender-2.1.1-py2.6.egg/archetypes/schemaextender/extender.py",
line 122, in cachingInstanceSchemaFactory
i'll make some time to debug this next week, currently try to finish up
some work for the ubuntu release freeze.
Hi! Did you make any progress on this?
It's because we miss some plone utilities. I have a small patch for bulk
script.
Attachments:
mirror.diff 1.5 KB