Hello,
Is there any way to make it work for anonymous users? It seems that I'm able to view all the comments only when I'm looged in. And one more thing... I use Corolla and this theme nicely shows the number of comments as you can see here: http://demo.kiwi-themes.com/node/77#comments . Is there any way to make this module show the number of comments?

Thanks.

Comments

betarobot’s picture

Status: Active » Closed (works as designed)

The module doesn't affect comment visibility for anonymous users. It has to deal with you general drupal settings I guess. (Run a few test, all work just fine here)

And for your second question: great catch, now this is a planed feature. Will get on it when time permits.

But please separate so different issues in two (or more) next time. Let's keep the issue line logical.

fabioloool’s picture

+ 1 .. for me in Drupal 7.14 only Administrator can see comments in both languages..

There is a particular setting or permission to set about comments orl languages?

Tanks

Algeron’s picture

Version: 7.x-1.0-alpha1 » 7.x-1.0-beta1
Priority: Normal » Major
Status: Closed (works as designed) » Active

I don't have a solution, but I can describe the problem and perhaps somebody can pick up on it.

Let's say I have an English node E and a translated Spanish node S. If someone posts a comment on E, it'll be visible to admins on both E and S, but anonymous visitors can only see it on E. If at that point someone posts a comment on S, then both comments will show up on both E and S.

So it seems there's a check that prevents Drupal from iterating through the comments if it can't find a comment associated with the node in that particular language. I would guess this is relatively easy to fix, but I'm only a Drupal beginner at this point. :-)

dendroud’s picture

I made little hack. Maybe it's not good, but worked.
Just comment in 271 line like /* if (($node->comment_count && user_access('access comments')) || user_access('administer comments'))*/

Anonymous’s picture

Used method described in #4 to allow anonymous users to see both translations comments. Didn't work for me out of the box, either.

What the line of code essentially tells us is that EITHER you have comment.module admin rights OR (the node's comments aren't empty AND the userid can view the comments). Now if you have 2 nodes, english and french, one of which HAS comments, the other one doesn't - the one which doesn't will never show the comment of the node with comments because of that check.

I suggest expanding the check to take into account all the nodes related to each other by a translation or simply remove the check for the comment count. This should do the trick already and make sure that access rights are still being considered.

if there are no comments in all of a translation sets' nodes, there won't be anything rendered anyways, from what I understand.

betarobot’s picture

@genox now that makes sense. Thanks for dill down! Somehow I could not really reproduce it as I did not have that scenario at all.

If somebody would be so nice as come up with patch covering that logic (and swear to test it) I'd be glad to commit it. Just meself is somewhat overloaded for next couple of months.

Anonymous’s picture

@betarobot - For the sake of simplicity, I would simply remove the check for existing comments count in the "if" statement. I will try to find out if this ends up throwing errors on translation sets without any comments when I get around to test it on my dev install next week.

If no errors are being thrown, this would be much simpler and faster than to fetch and count comments of all the nodes in a translation set. This would happen on each and every node display which adds a number of additional queries on each page load. Wouldn't require a patch either, just hitting backspace a couple times. ;-)

betarobot’s picture

Issue summary: View changes

Guys, if anybody could provide me with sample db dump to test this issues, it would be grand. I do not have any setup to replicate this issues currently as I mentioned.

adriancid’s picture

works fine for me, I test it now

adriancid’s picture

Status: Active » Reviewed & tested by the community