#3 — UnicodeDecodeError on folder_contents

by hvelarde last modified Feb 21, 2009 08:41 PM
State Confirmed
Version: 0.2
Area Process
Issue type Bug
Severity Medium
Submitted by hvelarde
Submitted on Jan 23, 2008
Responsible hvelarde
Target release:
if the section field contains non-ascii characters, a Smart Folder doesn't displays the query results but the following error:

2008-01-22T22:21:47 ERROR Zope.SiteErrorLog http://localhost:8080/ultimas/economia/folder_contents
Traceback (innermost last):
  Module ZPublisher.Publish, line 115, in publish
  Module ZPublisher.mapply, line 88, in mapply
  Module ZPublisher.Publish, line 41, in call_object
  Module Shared.DC.Scripts.Bindings, line 311, in __call__
  Module Shared.DC.Scripts.Bindings, line 348, in _bindAndExec
  Module Products.CMFCore.FSPageTemplate, line 195, in _exec
  Module Products.CacheSetup.patch_cmf, line 28, in FSPT_pt_render
  Module Products.CacheSetup.patch_utils, line 9, in call_pattern
  Module Products.CMFCore.FSPageTemplate, line 134, in pt_render
  Module Products.CacheSetup.patch_cmf, line 74, in PT_pt_render
  Module Products.CacheSetup.patch_utils, line 9, in call_pattern
  Module Products.PageTemplates.PageTemplate, line 104, in pt_render
   - <FSPageTemplate at /ultimas/folder_contents used for /ultimas/economia>
  Module TAL.TALInterpreter, line 238, in __call__
  Module TAL.TALInterpreter, line 281, in interpret
  Module TAL.TALInterpreter, line 749, in do_useMacro
  Module TAL.TALInterpreter, line 281, in interpret
  Module TAL.TALInterpreter, line 457, in do_optTag_tal
  Module TAL.TALInterpreter, line 442, in do_optTag
  Module TAL.TALInterpreter, line 437, in no_tag
  Module TAL.TALInterpreter, line 281, in interpret
  Module TAL.TALInterpreter, line 780, in do_defineSlot
  Module TAL.TALInterpreter, line 281, in interpret
  Module TAL.TALInterpreter, line 457, in do_optTag_tal
  Module TAL.TALInterpreter, line 442, in do_optTag
  Module TAL.TALInterpreter, line 437, in no_tag
  Module TAL.TALInterpreter, line 281, in interpret
  Module TAL.TALInterpreter, line 728, in do_defineMacro
  Module TAL.TALInterpreter, line 281, in interpret
  Module TAL.TALInterpreter, line 772, in do_defineSlot
  Module TAL.TALInterpreter, line 281, in interpret
  Module TAL.TALInterpreter, line 728, in do_defineMacro
  Module TAL.TALInterpreter, line 281, in interpret
  Module TAL.TALInterpreter, line 457, in do_optTag_tal
  Module TAL.TALInterpreter, line 442, in do_optTag
  Module TAL.TALInterpreter, line 437, in no_tag
  Module TAL.TALInterpreter, line 281, in interpret
  Module TAL.TALInterpreter, line 728, in do_defineMacro
  Module TAL.TALInterpreter, line 281, in interpret
  Module TAL.TALInterpreter, line 507, in do_setLocal_tal
  Module Products.PageTemplates.TALES, line 221, in evaluate
   - URL: file:CMFPlone/skins/plone_templates/folder_contents.pt
   - Line 18, Column 4
   - Expression: standard:'batch|python:contentsMethod(contentFilter,batch=True, b_size=b_size)'
   - Names:
      {'container': <PloneSite at /ultimas>,
       'context': <ATTopic at /ultimas/economia>,
       'default': <Products.PageTemplates.TALES.Default instance at 0x016C6F58>,
       'here': <ATTopic at /ultimas/economia>,
       'loop': <Products.PageTemplates.TALES.SafeMapping object at 0x062BF378>,
       'modules': <Products.PageTemplates.ZRPythonExpr._SecureModuleImporter instance at 0x016BC120>,
       'nothing': None,
       'options': {'args': ()},
       'repeat': <Products.PageTemplates.TALES.SafeMapping object at 0x062BF378>,
       'request': <HTTPRequest, URL=http://localhost:8080/ultimas/economia/folder_contents>,
       'root': <Application at >,
       'template': <FSPageTemplate at /ultimas/folder_contents used for /ultimas/economia>,
       'traverse_subpath': [],
       'user': <PropertiedUser 'admin'>}
  Module Products.PageTemplates.Expressions, line 185, in __call__
  Module Products.PageTemplates.Expressions, line 173, in _eval
  Module Products.PageTemplates.ZRPythonExpr, line 47, in __call__
   - __traceback_info__: contentsMethod(contentFilter,batch=True, b_size=b_size)
  Module Python expression "contentsMethod(contentFilter,batch=True, b_size=b_size)", line 1, in <expression>
  Module Products.ATContentTypes.content.topic, line 474, in queryCatalog
   - __traceback_info__: (<ATTopic at /ultimas/economia>, {'sort_order': 'reverse', 'section': {'operator': 'or', 'query': ('Econom\xc3\xada',)}, 'sort_on': 'effective', 'Type': ()})
  Module Products.CMFPlone.CatalogTool, line 379, in searchResults
  Module Products.ZCatalog.ZCatalog, line 685, in searchResults
  Module Products.ZCatalog.Catalog, line 735, in searchResults
  Module Products.ZCatalog.Catalog, line 476, in search
  Module Products.PluginIndexes.common.UnIndex, line 393, in _apply_index
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 6: ordinal not in range(128)
Steps to reproduce:
add a section which name has non-ascci characters, like "Economía"
create a News Item an set the section field to this value
create a Smart Folder to display the News Items on the "Economía" section
try to vie the Smart Folder results
Added by hvelarde on Jan 23, 2008 04:37 AM
Issue state: unconfirmedopen

No responses can be added.