We are evaluating Commons 3 Q&A in order to create a new community portal.
Create a question, many answers with different users, and start to vote with different users.
- even if there are some votes, the first time a user see the question page with the answers, the vote counters are not displayed (only + and - buttons)
- then the user votes, some answers' votes are updated, some not
- the user have to refresh/reload the page to see the current votes
- if the vote count is 0 on an answer, sometime it is not displayed (only + and - buttons), sometime it is
One could expect from a production ready release to work well on a so expected feature. Is there a way to fix this ?
Comments
Comment #1
ezra-g commentedSorry to hear that you're having problems here.
Adding to the list of issues for the Commons team to triage before the 3.1 release.
Comment #2
ttoine commentedWhen the 3.1 will be released ?
Comment #3
Anonymous (not verified) commentedWhen all issues in the "Commons 7.x-3.1 radar" are solved, I suppose.
Comment #4
ttoine commentedAddition: we noticed that in some cases, answers are duplicated when voting.
However, we can't understand why it is duplicated or not
Comment #5
ezra-g commentedCan you explain what you mean by duplication or post a screenshot?
Correct. We're targeting end of this week.
Comment #6
ttoine commentedScreenshot attached
Comment #7
ezra-g commentedI did some initial triage here:
I was able to reproduce:
To reproduce B, vote, then delete from {votingapi_vote} and {votingapi_cache}.
For
Having the vote totals update in the background after the page has been loaded is not currently part of the design, but would make a nice feature request for a separate issue.
Comment #8
ttoine commentedThanks a lot for your feedback. Do you think it can be fixed in 3.1 ?
Where can I do a feature request for the "vote totals update in the background after the page has been loaded"?
Comment #9
ttoine commentedJust to tell you we fixed the duplicate part of the bug. In the views, just select "disctinct" option.
Comment #10
japerryI too was able to reproduce, looking into this today. Ttoine, could you create a new issue for that feature request?
Comment #11
ezra-g commentedYou can add an issue at http://drupal.org/node/add/project-issue/commons.
Comment #12
japerryI've isolated the problem, it is due to our use of aggregating the votes in the widget, when the module is actually averaging them. Not quite sure of the fix, but it is certainly the commons rate widget, as all the other widgets work as they're supposed to.
will keep digging tomorrow ;-)
Comment #13
ttoine commentedfeature request: http://drupal.org/node/1945862
Comment #14
japerryRenamed this issue to be specific about the vote info block, which is fixed per this commit below.
there are other Q/A issues regarding thumbs vs +/-, as well as indicating if you already voted. They will be taken care of in #1921502: Re-theme Up/down widget per updated designs
http://drupalcode.org/project/commons_q_a.git/commit/5dc670b
Comment #15
ezra-g commentedRe-opening. In my testing, the vote total update is not reflected after casting a vote, but is reflected when refreshing the page.
Comment #16
japerrycrap. found some other new bugs. it appears to work when you're on specifically an answer node, but not when its rendered inside a question. The other bug here is that answer nodes should never appear on their own.
I also checked to see if it might be an issue with the 'points' vs 'percent' values in the resultset. It appears that when you use $results['up_percent'] instead of $results['rating'] it works. Perhaps there is an issue with the votingapi or rate module itself in how it caches these ratings.
Comment #17
ezra-g commentedIf this refers to the vote totals, perhaps either the widget is not outputting markup that Rate module's JS is looking for, or perhaps that JS needs to be revised to target differently.
This seems OK to tackle in a separate issue. #1946120: 'Answer added' activity stream message should link to the Answer node as displayed on the question covers a similar topic.
Can you elaborate on what "works" about this and where you're making this change?
Comment #18
ezra-g commented#1676746: Addtional Classes and more unique ID might be relevant to adjusting selectors.
Comment #19
ezra-g commentedRetitling.
Comment #20
ezra-g commentedI started troubleshooting and filed #1947008: Inaccurate vote sum displayed after voting until page is refreshed.
Comment #21
japerryAfter looking at #1947008: Inaccurate vote sum displayed after voting until page is refreshed I'm pretty sure its a problem with our widget defaulting to the users vote. I've change this, and made sure we're specifying the result score in the template.
I've uploaded a fix here:
http://drupalcode.org/project/commons_q_a.git/commit/cedf589
You can test if this works by either re-installing, or going to
/admin/structure/rate/2/edit
and setting the Average rating button.
Comment #22
ezra-g commentedThis doesn't appear at http://drupal.org/project/commons_q_a/git-instructions.
Comment #23
Growiel commentedHey guys,
Thanks, this is working just fine now.
I went ahead and updated the settings for the "Question" widget too, so that they both work the same way.
The only problem with this solution is that now you can't know if you voted "up" or "down" on this answer.
Maybe the widget should Highlight the thumbs according to what we voted.
Should I open a new feature request for this ?
Comment #24
japerryHi Growiel, we're refactoring some of the Q/A design in another issue #1921502: Re-theme Up/down widget per updated designs, which will involve adding some color to the thumbs/+/- up/down interface so people know which way they voted.
Comment #25
ttoine commentedjaperry, it looks great. when will you release this new design ?
Comment #26
ezra-g commentedMarking as "needs work" per the remaining upgrade path.
Comment #27
japerryComment #28
ezra-g commentedAdded an upgrade path, tested, and committed. Thanks!
http://drupalcode.org/project/commons_q_a.git/commit/f2bf323