New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename and Import of plonesite fails when site contains at least on file or image (dexterity) #839

Closed
fgrcon opened this Issue Aug 25, 2015 · 4 comments

Comments

Projects
None yet
4 participants
@fgrcon
Member

fgrcon commented Aug 25, 2015

Summary

  • If plonesite contains one or more image(s) or file(s) you can not rename plonesite.
  • If plonesite contains one or more image(s) or file(s) you can not import plonesite.zexp.
    Though you can import folder.zexp to plonesite even when folder contains images or files

Releases affected

Steps to reproduce

create clean plone site, optionally add folders, documents etc. (now images, or files)
rename plone site: ok
export/import : ok
add image /file to site (any position)
rename fails
export to .zexp: ok
import of zexp fails

Tracebacks ...

2015-08-21T10:17:26 ERROR Zope.SiteErrorLog 1440152246.790.965600444405 http://192.168.1.112:8080/manage_renameObjects
Traceback (innermost last):
  Module ZPublisher.Publish, line 138, in publish
  Module ZPublisher.mapply, line 77, in mapply
  Module ZPublisher.Publish, line 48, in call_object
  Module OFS.CopySupport, line 333, in manage_renameObjects
  Module OFS.CopySupport, line 392, in manage_renameObject
  Module zope.event, line 31, in notify
  Module zope.component.event, line 24, in dispatch
  Module zope.component._api, line 136, in subscribers
  Module zope.component.registry, line 321, in subscribers
  Module zope.interface.adapter, line 585, in subscribers
  Module zope.component.event, line 32, in objectEventNotify
  Module zope.component._api, line 136, in subscribers
  Module zope.component.registry, line 321, in subscribers
  Module zope.interface.adapter, line 585, in subscribers
  Module OFS.subscribers, line 113, in dispatchObjectMovedEvent
  Module zope.container.contained, line 153, in dispatchToSublocations
  Module zope.component._api, line 136, in subscribers
  Module zope.component.registry, line 321, in subscribers
  Module zope.interface.adapter, line 585, in subscribers
  Module OFS.subscribers, line 113, in dispatchObjectMovedEvent
  Module zope.container.contained, line 153, in dispatchToSublocations
  Module zope.component._api, line 136, in subscribers
  Module zope.component.registry, line 321, in subscribers
  Module zope.interface.adapter, line 585, in subscribers
  Module Products.CMFCore.CMFCatalogAware, line 267, in handleContentishEvent
  Module Products.CMFCore.CMFCatalogAware, line 68, in indexObject
  Module Products.CMFPlone.CatalogTool, line 327, in indexObject
  Module Products.CMFCore.CatalogTool, line 301, in reindexObject
  Module Products.CMFPlone.CatalogTool, line 345, in catalog_object
  Module Products.ZCatalog.ZCatalog, line 476, in catalog_object
  Module Products.ZCatalog.Catalog, line 341, in catalogObject
  Module Products.ZCatalog.Catalog, line 292, in updateMetadata
  Module Products.ZCatalog.Catalog, line 415, in recordify
  Module plone.indexer.delegate, line 18, in __call__
  Module plone.app.contenttypes.indexers, line 121, in getIcon_file
  Module zope.component.hookable, line 33, in __call__
  Module zope.component.hooks, line 104, in adapter_hook
  Module plone.dexterity.primary, line 25, in __init__
TypeError: ('Could not adapt', <Image at /Plone1-imagefolderimported/images/100-2013-09-08_img_1807.jpg>,
 <InterfaceClass plone.rfc822.interfaces.IPrimaryFieldInfo>) '  


2015-08-21T10:43:19 ERROR Zope.SiteErrorLog 1440153799.890.568543805731 http://192.168.1.112:8080/manage_importObject
Traceback (innermost last):
  Module ZPublisher.Publish, line 138, in publish
  Module ZPublisher.mapply, line 77, in mapply
  Module ZPublisher.Publish, line 48, in call_object
  Module OFS.ObjectManager, line 627, in manage_importObject
  Module OFS.ObjectManager, line 649, in _importObjectFromFile
  Module OFS.ObjectManager, line 359, in _setObject
  Module zope.event, line 31, in notify
  Module zope.component.event, line 24, in dispatch
  Module zope.component._api, line 136, in subscribers
  Module zope.component.registry, line 321, in subscribers
  Module zope.interface.adapter, line 585, in subscribers
  Module zope.component.event, line 32, in objectEventNotify
  Module zope.component._api, line 136, in subscribers
  Module zope.component.registry, line 321, in subscribers
  Module zope.interface.adapter, line 585, in subscribers
  Module OFS.subscribers, line 113, in dispatchObjectMovedEvent
  Module zope.container.contained, line 153, in dispatchToSublocations
  Module zope.component._api, line 136, in subscribers
  Module zope.component.registry, line 321, in subscribers
  Module zope.interface.adapter, line 585, in subscribers
  Module OFS.subscribers, line 113, in dispatchObjectMovedEvent
  Module zope.container.contained, line 153, in dispatchToSublocations
  Module zope.component._api, line 136, in subscribers
  Module zope.component.registry, line 321, in subscribers
  Module zope.interface.adapter, line 585, in subscribers
  Module Products.CMFCore.CMFCatalogAware, line 262, in handleContentishEvent
  Module Products.CMFCore.CMFCatalogAware, line 188, in notifyWorkflowCreated
  Module Products.CMFCore.WorkflowTool, line 289, in notifyCreated
  Module Products.CMFCore.WorkflowTool, line 635, in _reindexWorkflowVariables
  Module Products.CMFCore.CMFCatalogAware, line 88, in reindexObject
  Module Products.CMFCore.CatalogTool, line 301, in reindexObject
  Module Products.CMFPlone.CatalogTool, line 345, in catalog_object
  Module Products.ZCatalog.ZCatalog, line 476, in catalog_object
  Module Products.ZCatalog.Catalog, line 347, in catalogObject
  Module Products.ZCatalog.Catalog, line 292, in updateMetadata
  Module Products.ZCatalog.Catalog, line 415, in recordify
  Module plone.indexer.delegate, line 18, in __call__
  Module plone.app.contenttypes.indexers, line 121, in getIcon_file
  Module zope.component.hookable, line 33, in __call__
  Module zope.component.hooks, line 104, in adapter_hook
  Module plone.dexterity.primary, line 25, in __init__
TypeError: ('Could not adapt', <Image at /Plone-images/images/100-2013-09-08_img_1807.jpg>, <InterfaceClass plone.rfc822.interfaces.IPrimaryFieldInfo>)'
@davilima6

This comment has been minimized.

Show comment
Hide comment
@davilima6
Member

davilima6 commented Aug 25, 2015

@fgrcon

This comment has been minimized.

Show comment
Hide comment
@fgrcon

fgrcon Sep 18, 2015

Member

@davilima6: yes it is

still same issue with 5.0rc2 ...

Member

fgrcon commented Sep 18, 2015

@davilima6: yes it is

still same issue with 5.0rc2 ...

@hvelarde

This comment has been minimized.

Show comment
Hide comment
@hvelarde

hvelarde Sep 18, 2015

Member

seems a blocker to me

Member

hvelarde commented Sep 18, 2015

seems a blocker to me

@pbauer pbauer added this to the Plone 5.0 milestone Sep 19, 2015

@pbauer

This comment has been minimized.

Show comment
Hide comment
@pbauer

pbauer Sep 19, 2015

Member

Fixed in plone/plone.app.contenttypes@051caa6

Renaming or exporting and importing a complete portal has not worked properly as long as I can remember (even before dexterity). At minimum your catalog-entries and caches are gone which is also the source for this specific problem (the SCHEMA_CACHE of plone.dexterity is gone). I work around this but that does not mean that renaming and exporting/importing of complete plone-sites should now be considered best-practice.

Member

pbauer commented Sep 19, 2015

Fixed in plone/plone.app.contenttypes@051caa6

Renaming or exporting and importing a complete portal has not worked properly as long as I can remember (even before dexterity). At minimum your catalog-entries and caches are gone which is also the source for this specific problem (the SCHEMA_CACHE of plone.dexterity is gone). I work around this but that does not mean that renaming and exporting/importing of complete plone-sites should now be considered best-practice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment