#1 — getIcon error if mimetype not found

StateResolved
Version: 1.0
AreaFunctionality
Issue typePatch
SeverityMedium
Submitted byAlexander Pilz
Submitted onMay 26, 2008
Responsible Andreas Zeidler
Target release:
Return to tracker
Last modified on Jan 07, 2009 by Matthew Wilkes
If a file is stored using plone.app.blob with a contenttype that cannot be resolved by the mimetyperegistry, mimetyperegistry returns an empty tuple but plone.app.blob only tests for None.

content.py:#105# if mimetypeitem is None:
                     return super(ATBlob, self).getIcon(relative_to_portal)

This can be circumvented if the test is changed to

if mimetypeitem is None or mimetypeitem == tuple():
Steps to reproduce:
add a file with a content type unknown to mimetype registry. Call getIcon.
Added by(anonymous)onJun 15, 2008 04:15 PM
Responsible manager: witsch(UNASSIGNED)
hi alexander,

this should be fixed in http://dev.plone.org/plone/changeset/21188, thank you for reporting so precisely and the suggested fix! :)


andi

ps: i hope to get around to make a new release with this, but next week will probably be too busy. you'll have to use `trunk` for the time being — sorry for the inconvenience...
Added byAndreas ZeidleronJun 15, 2008 04:20 PM
Issue state: unconfirmedresolved
Responsible manager: (UNASSIGNED)witsch
forgot to close... :)

No responses can be added.