Patch for rating Zwiki pages with Plone 3.1.7

By | January 28, 2009

Traceback (innermost last)::

  Module ZPublisher.Publish, line 202, in publish_module_standard
  Module ZPublisher.Publish, line 150, in publish
  Module plone.app.linkintegrity.monkey, line 21, in zpublisher_exception_hook_wrapper
  Module Zope2.App.startup, line 221, in zpublisher_exception_hook
  Module ZPublisher.Publish, line 119, in publish
  Module ZPublisher.mapply, line 88, in mapply
  Module ZPublisher.Publish, line 42, in call_object
  Module Products.ZWiki.plugins.rating.rating, line 96, in vote
  TypeError

diff -up rating.py.old rating.py > rating.patch

--- rating.py.old       2009-01-27 17:07:52.000000000 +0100
+++ rating.py   2009-01-27 17:08:23.000000000 +0100
@@ -93,7 +93,7 @@ class PluginRating:
                 BLATHER("%s: recorded %s vote for %s" % \
                                     (self.pageName(),vote,username))
             catalog=self.catalog()
-            catalog.catalog_object(self, idxs=['rating', 'voteCount'])
+            catalog.catalog_object(self, idxs=['rating', 'voteCount'],uid=None)
             # only need to update votes indexes
             # note that likely all metadata is updated anyway

Leave a Reply

Your email address will not be published. Required fields are marked *