Hi,

I've installed and configured the 6.x-1.3 version, but it doesn't seem to work correctly on my site (I've only a test environment on XAMPP so far, no live site that I can show you yet).

I've configured the module so that it limits the number of comments to 1 per user and per node.

Then, I logged in as an authenticated user and submitted multiple comments for a same node and all comments went through, were listed in the approval queue and were published when approved.

What am I doing wrong?

Thanks!

Comments

tahiticlic’s picture

Hi,

Did you check the content type you're trying to limit?

cfab

bluedun’s picture

Yes, I did, I checked the content type for which I want to limit the number of comments.

I also rebuilt permissions, cleared the cache, but I still can post as many comments as I wish when I'm logged as an authenticated user.

tahiticlic’s picture

Do you use the Node comments module?

If not, I didn't try with an approval workflow : I'll test in order to reproduce the bug.

bluedun’s picture

Nope, I don't use the Node Comments module. I actually also tried allowing authenticated users to post comments without approval and it was the same; authenticated users could post any number of comments.

Here's a list of the other modules I've installed (in case One Comment Only conflicts with one of them):

captcha
cck
cck link to map
drupal tweaks
embed gmap
filefield
fivestar
fivestarextra
flag content
image
imageapi
imagecache
imagefield
lm paypal
maxlength
node limit
pathauto
taxonomy breadcrumb
taxonomy menu
thickbox
token
votingapi

Thanks for your help!

fanculo’s picture

Hi, I have the same problem.
I don't use an approval workflow.
Hope you will fix it..

tahiticlic’s picture

Status: Active » Needs review

Well, I don't know what I was thinking about, but this module is written to be used with Node Comments module... I've done this especially for this in the first time.
If you want to use it, enable the Node Comments module and that should work well.

I've corrected something in 1.4 by the way, on node parent id retrieving : please refer if you experiment problems.

fanculo’s picture

Nope..
I tried with a clean install of drupal 6, with node comments, configured to limit each user to 1 post, but he's still able to post infinitely.

tahiticlic’s picture

Ok. I hope this time I didn't introduce bugs...

I've corrected the comment detection which was based on node type name (which was a wrong idea since you can re-define it) and now use a comment specific attribute. I've also corrected the parent id retrieving, which is now also based on a comment specific attribute.

Let me know if it works better.

fanculo’s picture

No, I'm sorry..
Now has a strange behaviour:
I have an old node, and even if I delete all (node)comments, the normal user cannot post (instead the admin can).
So I created another node, tried to comment, and the normal user can post unlimited comments..

marcoBauli’s picture

hello, this seems due to the "insert comments without approval" permission.

Had same problem, after struggling with different versions of the module i arrived at that permission, which needs to be turned off for auth users in order for the module to work fine with the latest version of node_comment (6.x 1.2 rc2).

PS: also comments need to be written by an authenticated user (not superadmin) in order for the restriction to work, and does not seem to work with node_comments 2.x beta yet.

madaxe’s picture

I have that permission turned off and still users can post unlimted comments.
It's seeming that this module does absolutely nothing at all.

I am using node comments

You say it doesn't work with node_comments 2.x beta?

That seems to be the only version of the module available for download. And has been for 6 months.

madaxe’s picture

Tried this on a test site with node_comment (6.x 1.2 rc2) (the supposed compatible version from a while ago)

But the same problem arises. Users (not the superadmin user but any user) can post as many comments as they would like.

Had the insert comments without approval" permission turned off. Everything else as it should be. One comment only set to 1.

Tried this on 3 sites across 3 servers. ONe of the sites has the bare basic module installed (it's for testing clashes) and it did not work on this site either.

Diagnosis: Does not work.

Pity, it's a great idea.

tahiticlic’s picture

I've forgotten this module... I will have a look at this as soon as possible.

NathanM’s picture

Trying with node comment beta 2, I got the following error on a node which had a comment limit of one:

user warning: Unknown column 'n.nid' in 'on clause' query: SELECT DISTINCT COUNT(DISTINCT(nc.cid)) as c FROM node_comments nc INNER JOIN node_access na ON na.nid = n.nid WHERE (na.grant_view >= 1 AND ((na.gid = 0 AND na.realm = 'all') OR (na.gid = 3 AND na.realm = 'user_relationship_node_access_author') OR (na.gid = 0 AND na.realm = 'og_public'))) AND ( nc.nid= 9) in /home/asiascen/public_html/hkscene2/sites/all/modules/one_comment_only/one_comment_only.module on line 85.

Comment was still posted.