[#1423 Error when rating a wiki page in Plone 3.1.7]

[email protected] (vejeta) Wed, 28 Jan 2009 07:46:11 -0800
Newsgroups gmane.comp.web.zope.zwiki
Message-ID <20090128074601-0800__907.746997154568$1233157718$gmane$org@zwiki.org>
When I try to rate a Wiki page, through the stars icons, I get the attached Traceback, instead of the page being rated and the stars updated.


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

This can be fixed with this 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


--
forwarded from http://zwiki.org/1423ErrorWhenRatingAWikiPageInPlone317#[email protected]