An illegal choice has been detected. Please contact the site administrator.

abaddon - August 7, 2009 - 22:37
Project:User Comment
Version:6.x-1.0-beta1
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:needs review
Description

when setting the "skip author's approval queue when posting comments" permission for the module you get an error like "An illegal choice has been detected. Please contact the site administrator."
like noted here too http://drupal.org/node/469478#comment-1770562

fix : edit usercomment.module and find that string (line 191 & 312)
remove the single quote from the string like "skip authors approval..", i think drupal's permission system chokes on that one and it works ok afterwards

<?php
 
.......
 
$perms = array(
   
"skip authors approval queue when posting comments",
   
'administer comments on own content',
  );
  .......
  }
  elseif (
user_access('skip authors approval queue when posting comments')) {
    return
FALSE;
  }
  .......
?>

 
 

Drupal is a registered trademark of Dries Buytaert.