[Erp5-dev] Where is mimetypes_registry portal tool?

Ivan Tyagov ivan at nexedi.com
Sun Oct 7 15:09:01 CEST 2007


Hi,

?ukasz Nowak wrote:
> Hello,
> 
> I'm playing with Web Message portal type. There is preview tab, which
> invokes asStrippedHTML but those method raises attached exception. How
> may I add mimetypes_registry tool? Searching thorough sources, mailing
> lists or wiki do not returns any info about mimetypes_registry.

You need 'MimetypesRegistry' and 'PortalTransforms' both versions 
1.4.0-final (it's somehow old though working, latest should work too - I 
haven't tested them).
Currently they are not available under ERP5 SVN and RPM repositories 
(will make sure that we put respective RPM soon) although the spec files 
are created.
If you can not find them please contact me directly I can send it to you.
Regards
Ivan


> 
> 
> ------------------------------------------------------------------------
> 
> Traceback (innermost last):
> 
> Module ZPublisher.Publish, line 101, in publish
> 099 |                      missing_name,
> 100 |                      dont_publish_class,
> 101>|                      request, bind=1)
> 102 |
> 103 |        if result is not response:
> 
> Module ZPublisher.mapply, line 88, in mapply
> 086 |
> 087 |    args=tuple(args)
> 088>|    if debug is not None: return debug(object,args,context)
> 089 |    else: return object(*args)
> 
> Module ZPublisher.Publish, line 39, in call_object
> 037 |
> 038 |def call_object(object, args, request):
> 039>|    result=apply(object,args) # Type s<cr> to step into published object.
> 040 |    return result
> 041 |
> 
> Module Products.ERP5.Document.Document, line 1092, in asStrippedHTML
> 1090 |      mime, data = self.getConversion(format='stripped-html')
> 1091 |      return data
> 1092>|    mime, html = self.convert(format='html')
> 1093 |    body_list = re.findall(self.body_parser, str(html))
> 1094 |    if len(body_list):
> 
> Module Products.ERP5.Document.EmailDocument, line 250, in convert
> 248 |    if format == 'raw':
> 249 |      return 'text/plain', self.getTextContent()
> 250>|    mime_type = getToolByName(self, 'mimetypes_registry').lookupExtension('name.%s' % format)
> 251 |    src_mimetype = self.getTextFormat(DEFAULT_TEXT_FORMAT)
> 252 |    if not src_mimetype.startswith('text/'):
> 
> Module Products.CMFCore.utils, line 81, in getToolByName
> 079 |    else:
> 080 |        if tool is _marker:
> 081>|            raise AttributeError, name
> 082 |        return tool
> 083 |
> AttributeError: mimetypes_registry
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Erp5-dev mailing list
> Erp5-dev at erp5.org
> http://mail.nexedi.com/mailman/listinfo/erp5-dev




More information about the Erp5-dev mailing list