2011/04/19

DateIndex Patch for DateError

在 Plone 4.0.2 ZMI portal_catalog/Indexes 裡,點選 DateIndex 後,想要 Browse 時,偶而會遇到 DateError: Invalid date: (1915, 0, 7, 4, 59, 0, 'UTC') 的錯誤,雖然前台還沒遇到問題,但這樣的狀況總叫人不安。

plone IRC 有人提到,這是 manage_browse 的臭虫,使用 browseIndex.dtml DateIndex 當關鍵字,找到 Browse DateIndex Broken for edge cases,將 Zope2 的 Products/PluginIndexes/dtml/browseIndex.dtml 加上 patch 之後,有暫時處理這個臭虫。不過,後來發現搭配 eea.jquery 的 datepicker 功能時,還是會有月份數字少1的問題,例如輸入 1999-01-01 會變成 1999-00-01,看來沒有一勞永逸。

No comments: