The "create a node" captcha point doesn't seem to work. The others (e.g. site wide contact form) captcha points work, just not the "create a node" one.

I have tried:
- emptying the user role permissions in my database and redefining them
- resetting the Captcha settings back to the default and redefining the settings again
- updated the module to the latest release
- cleared cookies/files etc in the internet browser
- tried the patch for "Adding Captcha Points" (http://drupal.org/node/89127)

I particularly need this captach point to work for anon users creating a story node - since I have recently been getting a lot of spam stories; though they are not auto published I'd rather not have to delete the spam posts.
Any ideas?

CommentFileSizeAuthor
#4 node_forms.patch656 bytesCrell

Comments

rayarub’s picture

Version: 4.7.x-1.1 » 4.7.x-1.x-dev
Priority: Normal » Critical

I'm having the same issue... the captcha does not appear on node creation forms, even though it is enabled for both anonymous and authenticated users. Any solutions would be greatly appreciated.

rayarub’s picture

Status: Active » Needs review

Add this code after line 34 (the end of the $captcha_points array definition) to fix the problem:

  $node_types = node_get_types();
  
  foreach($node_types as $k => $t) {
  	$captcha_points[$k . "_node_form"] = t('Create a ' .  $t . ' node');
  }

The issue is that the form ID for each node creation form is not just node_form, but typeName_node_form. You'll need to set everything up in admin->settings->captcha after applying the fix.

marcoBauli’s picture

+1 working fine here, thx!

Crell’s picture

Status: Needs review » Needs work
StatusFileSize
new656 bytes

I rolled this up into a proper patch, but ran into a problem. When dealing with CCK-defined nodes, the variable name can get rather large. So large, in fact, that it goes past the 48-character limit on variable names. It then fails when trying to set the variable a second time, as the delete statement in variable_set() doesn't delete the record and it then tries to insert a name that already exists.

Not sure how to fix that without changing the naming scheme or the variable table. So here's the patch, and I'll leave it to the module maintainer to figure out.

nicholasthompson’s picture

+1 on this fix for us (www.pponline.co.uk).

BioALIEN’s picture

Just wanted to point out this issue which may be related to this and help cross reference the two issues bugs:
http://drupal.org/node/103634

Crell’s picture

Status: Needs work » Needs review

Yep. I already linked that one back here. Hopefully we can get it backported. If not, this patch seems to work except for long names. It's the module maintainer's call whether he wants to commit it as-is or wait for a backport or find some other workaround.

colan’s picture

Has anyone found a workaround for the character limit problem? I keep running into it. Thanks.

mstef’s picture

PATCH DOES NOT WORK ENTIRELY..

It is successful in showing up during node creation, and giving options in admin for each node type. BUT, this is what happens on my site. I have previews required and I believe that is the problem, but i do not want to disable that option, and even if I do, previewing will always be an option. Anyway, the captcha is required right away just for previewing, before submitting is available. after you enter the characters and the preview page comes up, there is no captcha anymore and the submit button is visible now. but when you press submit, it throws an error that the catpcha is missing and then the image shows. even if you enter the characters there again, you just end up right back where you started at the submit page...

Is that clear?
Need a fix seriously...Any ideas??
THANKS

mstef’s picture

and as I suspected..the same problem arises with comment submissions..

any ideas.............?

heine’s picture

The following query (on mysql) will do:

ALTER TABLE variable CHANGE name name varchar(255) NOT NULL default '';

This could be done in a .install file.

colan’s picture

That query makes sense. Thanks, it did the trick! I wonder how it'll get solved long-term though. Maybe it'll have to be done universally.

Crell’s picture

The size of the variable field has already been increased in Drupal 6-dev. I've asked for it to be backported to Drupal 5.2 because of this issue, but that's in drumm's hands now.

mstef’s picture

wait..that wasn't for my problem..was it??!

heine’s picture

@mikestefff, please open a new issue as it seems the cause is different.

ax’s picture

Status: Needs review » Reviewed & tested by the community

patch applies and works - please commit (i could do this if wished so). cck, variable length, etc. should be addressed in separate issues.

wundo’s picture

Status: Reviewed & tested by the community » Closed (fixed)