在應用Plone security patch 20161129之後,我們的PloneFormGen表單不再適用,因爲它包含元音變音(ä,ö,ß或€)。我們使用PloneFormGen 1.7.20,它是Plone 4.3.9的推薦版本。這裏的堆棧跟蹤:PloneFormGen在Plone安全補丁後的UnicodeDecodeError 20161129
Module zope.tales.tales, line 696, in evaluate
- URL: file:/var/plone/buildout-cache/eggs/Products.PloneFormGen-1.7.20-py2.7.egg/Products/PloneFormGen/skins/PloneFormGen/widget_fieldset_start.pt
- Line 25, Column 10
- Expression: <PythonExpr widget.Description(here)>
- Names:
{'container': <PloneSite at /mysite>,
'context': <FormFolder at /mysite/mitglied-werden>,
'desitelt': <object object at 0x7fe244f734b0>,
'here': <FormFolder at /mysite/mitglied-werden>,
'loop': {u'field': <Products.PageTemplates.Expressions.PathIterator object at 0x16fe5350>},
'nothing': None,
'options': {'args':(),
'state': <Products.CMFFormController.ControllerState.ControllerState object at 0x7fe22c676610>},
'repeat': <Products.PageTemplates.Expressions.SafeMapping object at 0x1d61fc00>,
'request': <HTTPRequest, URL=https://www.example.org/mitglied-werden/fg_base_view_p3>,
'root': <Application at >,
'template': <FSControllerPageTemplate at /mysite/fg_base_view_p3 used for /mysite/mitglied-werden>,
'traverse_subpath': [],
'user': <PloneUser 'siteb390'>}
Module Products.PageTemplates.ZRPythonExpr, line 48, in __call__
- __traceback_info__: widget.Description(here)
Module PythonExpr, line 1, in <expression>
Module Products.PloneFormGen.content.field_utils, line 27, in wDescription
Module zope.i18n, line 107, in translate
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 20: ordinal not in range(128)
刪除變音後它再次工作,但現在形式看起來有點不專業。
爲了這個錯誤,我在網上搜索了一個小時之後,我不知道哪個擴展會導致這個問題(PloneFormGen?)導致這個問題,以及如何解決這個問題: - 甚至不知道哪個方向看得更遠。 ..
在https://github.com/smcmahon/Products.PloneFormGen/issues提交錯誤報告。確保你包含了你使用非ASCII字符的完整描述。 – SteveM
看着1.7.20的更新日誌,我的直覺認爲它看起來像處理https://github.com/smcmahon/Products.PloneFormGen/issues/178中的錯誤,可能與安全補丁無關。 (不是說「安全補丁在unicode數據中斷」將是新的和令人驚訝的。)另外,我無法使用1.7.19和安裝的修復程序進行復制。 –