Skip to content
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

Unicodedecode error when catalog names contains unicode characters #133

Open
dals83 opened this issue Oct 12, 2017 · 4 comments
Open

Unicodedecode error when catalog names contains unicode characters #133

dals83 opened this issue Oct 12, 2017 · 4 comments
Labels

Comments

@dals83
Copy link

dals83 commented Oct 12, 2017

I have a catalog index which contains names with the letters 'æøå'. However when I use these catalog index names for faceted search I get a unicodedecode error.

I have added the stack trace below:

/home/danni/Development/Plone/Ankestyrelsen/ajour/Ankestyrelsen/eggs/Products.ZCatalog-3.0.2-py2.7.egg/Products/PluginIndexes/common/UnIndex.py:428: UnicodeWarning: Unicode equal comparison failed to convert both arguments to Unicode - interpreting them as being unequal
  s = index.get(k, None)
2017-10-12 13:18:52 ERROR eea.facetednavigation 'ascii' codec can't decode byte 0xc3 in position 11: ordinal not in range(128)
Traceback (most recent call last):
  File "/home/danni/Development/Plone/Ankestyrelsen/ajour/Ankestyrelsen/eggs/eea.facetednavigation-10.3-py2.7.egg/eea/facetednavigation/browser/app/query.py", line 180, in query
    brains = catalog(self.context, **query)
  File "/home/danni/Development/Plone/Ankestyrelsen/ajour/Ankestyrelsen/eggs/eea.facetednavigation-10.3-py2.7.egg/eea/facetednavigation/search/catalog.py", line 116, in __call__
    return search(**newquery)
  File "/home/danni/Development/Plone/Ankestyrelsen/ajour/Ankestyrelsen/eggs/Products.CMFPlone-5.0.6-py2.7.egg/Products/CMFPlone/CatalogTool.py", line 390, in searchResults
    return ZCatalog.searchResults(self, REQUEST, **kw)
  File "/home/danni/Development/Plone/Ankestyrelsen/ajour/Ankestyrelsen/eggs/Products.ZCatalog-3.0.2-py2.7.egg/Products/ZCatalog/ZCatalog.py", line 604, in searchResults
    return self._catalog.searchResults(REQUEST, used, **kw)
  File "/home/danni/Development/Plone/Ankestyrelsen/ajour/Ankestyrelsen/eggs/Products.ZCatalog-3.0.2-py2.7.egg/Products/ZCatalog/Catalog.py", line 1072, in searchResults
    return self.search(args, sort_indexes, reverse, sort_limit, _merge)
  File "/home/danni/Development/Plone/Ankestyrelsen/ajour/Ankestyrelsen/eggs/Products.ZCatalog-3.0.2-py2.7.egg/Products/ZCatalog/Catalog.py", line 549, in search
    r = _apply_index(query, rs)
  File "/home/danni/Development/Plone/Ankestyrelsen/ajour/Ankestyrelsen/eggs/Products.ZCatalog-3.0.2-py2.7.egg/Products/PluginIndexes/common/UnIndex.py", line 428, in _apply_index
    s = index.get(k, None)
@avoinea
Copy link
Member

avoinea commented Oct 12, 2017

@dals83 Which Plone, which eea.facetednavigation version, which faceted widget?

Can also please export faceted navigation configuration to XML and provide it here?!

Thank you!

@dals83
Copy link
Author

dals83 commented Oct 30, 2017

Hi @avoinea,

Sorry for late reply. But here it goes:

  • Plone version: 5.0.6
  • eea.facetedversion 10.3
  • Widget: select

And I have added a zippet version of the configuration XML.
facetednavigation-config.zip

@pbauer
Copy link
Contributor

pbauer commented Feb 15, 2018

I can confirm this issue with version 10.8 and Plone 5.1rc2 and the radio-widget. It happens when the values for the widget are taken from the catalog (not from a vocabulary) and one of them has a ü.

@avoinea avoinea added the Bug label Feb 15, 2018
@jensens
Copy link
Contributor

jensens commented Jul 9, 2018

Still an issue here. In this case I have a KeywordIndex used for checkboxes. Customer used an umlaut (ü) in the value. This stopped the Javascript working at all and so broke the whole faceted navigation.

I use Plone 5.1.2 and eea.facetednavigation 11.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants