Hello,

This is probably just due to fact that I don't have enough experience, and it's more relative to Views probably.

I am currently working on an international project and having difficulties to sum up the votes from the same node which is translated into other languages. Currently I have a content type "idea" where user can create a kind of idea, which is simple text. Users then can vote the ideas (thumbs up) if they find it interesting. All the ideas are translated into another languages as said before.

Now I created a view, where you can find the content of idea, number of votes (number of thumbs up), plus you can vote the ideaif you did not do that before. Problem is, I cannot find the way to tell the view to sum up the votes for the idea if it is translated. Imagine situation that I have an idea in two languages (en, de)

EN: Good idea
DE: Die gute Idee

View is dependent on current user's language version. So when I am on the german version of an view I can vote the german idea and everything is ok. I see 1 vote and cannot vote anymore. On english version I shouldn't be possible to vote, since this idea is the same, it's just translated. But of course I can. And if I do, the number of votes is not 2, but again 1. It's because this is still just another node in the end. How can I tell the View to act like this is the same Content and it should sum the votes up for every translated version?

Comments

hideaway’s picture

I thought I found elegant solution, but still have some issues. Basically I made relationship to the source translation of the node in the View and trying to count and display votes only for source translations. This looked fine, but unfortunately Rate is always generating widget for current node, even if the relation is set with node source translation. The votes in the View's select are trying to get by using node source translation id, but the widget is generated for current (translated) node. Why is that? :(

My original (english) node id is 764 and german one is 765. The View is always trying to get votes for nid 764, which is good, but on german language version, the Rate is always generating widget for current's language version of the node, in my case 765, totally ignoring relationship to vote results via original (source) node (764) :(

hideaway’s picture

This has to be definitely some kind of bug, because Total votes number is always taken for the source node. The same field displayed as Rate Widget is generating vote possibility for current node id, which is incorrect. Based on defined relationships, vote possibility should be generated always for source node id too.

hideaway’s picture

Issue summary: View changes

typos

hideaway’s picture

Issue summary: View changes

better explanation

  • mauritsl committed 2b7f428 on 8.x-1.x
    Issue #1862916: Add option to use source translation for saving /...
dan kolbas’s picture

This might be partly related to the issue with the "Use Source Translation" feature listed here: https://www.drupal.org/node/2314511#comment-11935097. Once this is fixed it might help.

ivnish’s picture

Status: Active » Closed (outdated)

Drupal 7 is EOL. Issue will be closed

Now that this issue is closed, please review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, please credit people who helped resolve this issue.