Open hvelarde opened 7 years ago
@hvelarde It looks like a adapter register problem:
For folderish Archetypes content we register it for Products.CMFCore.interfaces.IFolderish
--> https://github.com/4teamwork/ftw.zipexport/blob/master/ftw/zipexport/representations/archetypes.py#L18
And if DX is available we register it also for plone.dexterity.interfaces.IDexterityItem
--> https://github.com/4teamwork/ftw.zipexport/blob/master/ftw/zipexport/representations/dexterity.py#L22
Your type is folderish an a dexterityitem, looks like IFolderish
wins.
I guess the easiest way for now is to register a more specific adapter using the IPhotoGallery
interface
mmm, seems we have a different problem: the views for this content type are not registered correctly; we are using the class instead of the interface:
<browser:page zcml:condition="installed ftw.zipexport"
for="sc.photogallery.content.PhotoGallery"
name="zip"
class=".ZipView"
permission="zope2.View"
layer="sc.photogallery.interfaces.IBrowserLayer"
/>
I'll test and let you know.
CC @rodfersou
@maethu it didn't work, so we probably need to register the multi-adapter indeed; I'll close this once we fix the issue to leave it as documentation, thanks!
I'm working on adding support for Dextrity-based content types to one package that uses yours as a dependency.
I'm almost there but I found an issue with the ZipGenerator class as it seems to select the Archetypes implementation by mistake:
our source code is here:
https://github.com/collective/sc.photogallery/blob/1.0b1/src/sc/photogallery/browser/view.py#L87-L100
can you give me a hint on how to solve this?