Closed (fixed)
Project:
Internationalization
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
15 Jun 2008 at 22:18 UTC
Updated:
10 Feb 2010 at 14:27 UTC
Multilingual Poll correctly propagates voting results in translated versions' pages, but the Last Poll starts to count for every translated version of the poll separately.
Comments
Comment #1
Jan Van Hyfte commentedWaiting for a "professional solution" i have made following changes to my Poll_Pages.Inc:
function poll_page() {
// List all polls.
+ global $language;
+ $langcode = $langcode ? $langcode : $language->language;
- $sql = db_rewrite_sql("SELECT n.nid, n.title, p.active, n.created, SUM(c.chvotes) AS votes FROM {node} n INNER JOIN {poll} p ON n.nid = p.nid INNER JOIN {poll_choices} c ON n.nid = c.nid WHERE n.status = 1 GROUP BY n.nid, n.title, p.active, n.created ORDER BY n.created DESC");
+ $sql = db_rewrite_sql("SELECT n.nid, n.title, p.active, n.created, SUM(c.chvotes) AS votes FROM {node} n INNER JOIN {poll} p ON n.nid = p.nid INNER JOIN {poll_choices} c ON n.tnid = c.nid WHERE n.status = 1 and n.language = '" . $langcode . "' GROUP BY n.nid, n.title, p.active, n.created ORDER BY n.created DESC");
this solves the issue for me.
Comment #2
jose reyero commentedYou have to use the new block provided by the module for that: Most recent poll (Aggregated translations)
Comment #3
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.
Comment #4
clata commentedI applied your solution and it works fine for the multilingual poll page (the node I mean). Unfortunately I cannot say the same about the most recent poll block. It still reports different vote statistics depending on the used language for voting.
Comment #5
malc0mn commentedhow about this:
in /modules/poll/poll.pages.inc ofcourse...