I found when I used the User Points Node Limit module, it sometimes would go to a white screen without displaying anything if the user was below the required points to post a node. It hinges on this code on line 31-37 of userpoints_nodelimit.module:

<?php
      //destory the form
      $form = NULL;
      //return a simple hidden field so that function doesn't fail
      $form['dummy'] = array(
        '#type' => 'hidden',
        '#default_value' => '',
      );
?>

I found that it works best to replace that with a drupal_goto() command to redirect the user back to another screen. It will still throw the message generated just before that, but it seems more logical to have the user redirected back to the node/add page instead of a blank form.

I would recommend changing that, or perhaps setting up another option, but as it is, it doesn't seem to work correctly all the time.

CommentFileSizeAuthor
#2 userpoints_nodelimit.patch1.25 KBeliotkohan

Comments

kbahey’s picture

Status: Active » Needs work

Can you please format this into a proper patch? See http://drupal.org/patch for all the details on how to create one.

eliotkohan’s picture

StatusFileSize
new1.25 KB

I don't know if this is still relevant, but I finally got around to putting together a patch for this.

kbahey’s picture

Version: 5.x-3.0-beta » 5.x-3.0

One hunk fails in the patch. Please create a new patch using the 5.x-3.0 version (the latest).

Also, the wording in the drupal_set_message() is very site specific and not generic enough for inclusion. Not all sites have the bio module or use "fiction". Please make it more generic.

As well, there is an if/else statement all on one line. Break it down to multiple lines according to the coding style.

berdir’s picture

Status: Needs work » Closed (won't fix)

Sorry for pinging the participants.

Now that Drupal 7 is out, there is no support for Drupal 5 and the
corresponding modules anymore. Therefore, I'm closing all old issues
which are still open.

I suggest you upgrade to Drupal 6 or 7 and figure out if you're feature
is still needed or the bug still exists and open a new issue in that
case.