Ticket #13964 (confirmed Bug)
('Could not adapt', <Image at /PloneNew/image.gif>, <InterfaceClass plone.rfc822.interfaces.IPrimaryFieldInfo>)
Reported by: | jianaijun | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | 4.x |
Component: | Unknown | Version: | 4.3 |
Keywords: | Cc: |
Description
I have a Plone 4.3.2 site with plone.app.contenttypes-1.1b1. I created a Image, Rename site ID, I receive the following error:
ERROR Zope.SiteErrorLog 1395822469.640.340655782968
http://localhost:8080/manage_renameObjects Traceback (innermost last): Module ZPublisher.Publish, line 138, in publish Module ZPublisher.mapply, line 77, in mapply Module Products.PDBDebugMode.runcall, line 70, in pdb_runcall 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 Products.CMFCore.CMFCatalogAware, line 267, in handleContentishEvent Module Products.CMFCore.CMFCatalogAware, line 68, in indexObject Module Products.CMFPlone.CatalogTool, line 335, in indexObject Module Products.CMFCore.CatalogTool, line 301, in reindexObject Module Products.CMFPlone.CatalogTool, line 353, in catalog_object Module Products.PDBDebugMode.zcatalog, line 20, in catalog_object Module Products.ZCatalog.ZCatalog, line 476, in catalog_object Module Products.ZCatalog.Catalog, line 320, in catalogObject Module Products.ZCatalog.Catalog, line 270, in updateMetadata Module Products.ZCatalog.Catalog, line 396, 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 24, in __init__ TypeError: ('Could not adapt', <Image at /PloneNew/image.gif>, <InterfaceClass plone.rfc822.interfaces.IPrimaryFieldInfo>) > /home/free/Plone/buildout-cache/eggs/plone.dexterity-2.2.1-py2.7.egg/plone/dexterity/primary.py(24)__init__() 23 if not primary: ---> 24 raise TypeError('Could not adapt', context, IPrimaryFieldInfo) 25 self.fieldname, self.field = primary
Plone 4.3.2 (4307)
CMF 2.2.7
Zope 2.13.21
Python 2.7.3 (default, Jan 2 2013, 13:56:14) [GCC 4.7.2]
PIL 1.7.8 (Pillow)
plone.app.contenttypes-1.1b1
Change History
comment:2 Changed 16 months ago by espenmn
I don't think this has anything to do with the renaming of the site, as i see the same without renaming it. Try the following: 1) Add a plonesite, with p.a.contentypes 2) Add an image 3) Go to ZMI, export the plonesite 4) Delete the Plonesite and import the ZEXP you just created 5) You will get the same error
Note: See
TracTickets for help on using
tickets.
FTR: Reproducable. FYI: Renaming sites is prone to cause conflicts and should be avoided. Anyway thanks for the report, this still needs to be tracked down.