kapilt / contentmirror

Automatically exported from code.google.com/p/contentmirror
1 stars 0 forks source link

ore.contentmirror breaks with empty Plone 4.0.8 #79

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
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'

Original issue reported on code.google.com by d...@tonimueller.org on 21 Sep 2011 at 11:51

GoogleCodeExporter commented 9 years ago
Forgot to say: I used ore.contentmirror as of SVN HEAD.

Original comment by d...@tonimueller.org on 21 Sep 2011 at 11:52

GoogleCodeExporter commented 9 years ago
Looks like bug with archetypes.schemaextender can you try without the extender?

Original comment by runy...@gmail.com on 22 Sep 2011 at 12:46

GoogleCodeExporter commented 9 years ago
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?

Original comment by d...@tonimueller.org on 22 Sep 2011 at 10:05

GoogleCodeExporter commented 9 years ago
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
    lookup = site.aq_acquire
AttributeError: 'NoneType' object has no attribute 'aq_acquire'

Original comment by d...@tonimueller.org on 22 Sep 2011 at 2:05

GoogleCodeExporter commented 9 years ago
i'll make some time to debug this next week, currently try to finish up some 
work for the ubuntu release freeze.

Original comment by kapilt@gmail.com on 22 Sep 2011 at 3:35

GoogleCodeExporter commented 9 years ago
Hi! Did you make any progress on this?

Original comment by d...@tonimueller.org on 18 Oct 2011 at 10:20

GoogleCodeExporter commented 9 years ago
It's because we miss some plone utilities. I have a small patch for bulk script.

Original comment by and...@mleczko.net on 15 Feb 2012 at 4:26

Attachments: