Currently the votingapi_recalculate_results() function assumes that the voting tag is set to 'vote,' and therefore only supports one tag per node type.
This patch allows a node to be voted upon on more than one tag by specifying the tag in both the recalculation function and retrieval of raw votes for the node (i.e. $content_id).
Without this patch, then extra voting tags will be recalculated, the cache for other tags are deleted and extraneous results passed back to fivestar module.
This patch was made against the dev version of 1.40.2.6
I also submitted this patch for another bug also made against version 1.40.2.6 and so let me know if either one of them needs to be rerolled once they get applied.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | votingapi_recalculate_specific_tag_implodeerror_0.patch | 2.97 KB | KentBye |
| votingapi_recalculate_specific_tag.patch | 1.95 KB | KentBye |
Comments
Comment #1
KentBye commentedThis patch is a combination of this one as well as this related patch here.
This previous patch is dependent upon the implode patch, and so I combined them.
Let me know how to best handle this in the future.
Thanks, -Kent.
Comment #2
eaton commentedNot quite...
Either there is some misunderstanding going on, or we're talking about different things, but votingapi's recalculation should handle all tags for a node, not just vote tags. It might be desirable to trigger recalculations for only a small subset under certain circumstances, but the current function should take all tags into account, not just 'vote'... hmmm.
I'll have to take a closer look.
Comment #3
KentBye commentedJust had a chat with Eaton on IRC about this.
Looks like this patch may break other functionality when other modules are participating in the recalculation process.
Eaton says, "I will look closer at it, but until I have a chance to really evaluate the impact, I can't promise that the recalc code will become more granular right now..."
Comment #4
eaton commentedIn version 2.x, the recalculation mechanism is flexible enough to handle these cases differently.
Comment #5
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.