-
-
Notifications
You must be signed in to change notification settings - Fork 194
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
getIcon indexer returns True for a folderish item with any children with id "image" #3916
Comments
I have included a test that triggers the bug. I am not sure how to properly fix this... I don't think we want to import behaviors such as https://github.com/plone/plone.app.contenttypes/blob/master/plone/app/contenttypes/behaviors/leadimage.py in here? |
@frapell How about, get the image attribute like it does currently, but then add a check that the value is an instance of NamedImage? |
@davisagli Yeah, it is either that or maybe adding |
@frapell the IImage interface check should work |
…stance of `plone.namedfile.interfaces.IImage`. fixes gh-3916
So to implement the "icon" for a content, a NamedImage or an object implementing the |
@yurj I am not sure why this indexer is called |
The issue is happening here
Products.CMFPlone/Products/CMFPlone/CatalogTool.py
Lines 226 to 237 in 72ec2ca
In order to see the problem:
At this point, if you go check the indexed folder from step 1 (/Plone/test-folder) you will notice that the
getIcon
metadata is True.This causes issues, such as plone/plone.namedfile#156
@davisagli provided a bit more context in this other issue, however I believe this must be fixed here, and have
getIcon
to properly return True only when the indexed item does have an image.The text was updated successfully, but these errors were encountered: