I don't know if this would be considered a bug in node privacy byrole or in Drupal itself.
As soon as I installed this module and tried to set default permissions for a content type, I got 14 separate database errors upon submitting the content type settings form. Like this:
* user warning: Duplicate entry 'npbr_foredit_content_researcher_profile_default_' for key 1 query: INSERT INTO variable (name, value) VALUES ('npbr_foredit_content_researcher_profile_default_3', 'i:0;') in /public_html/includes/database.mysql.inc on line 121
The Drupal database schema only allows for values up to 48 characters in length in the variable.name field. That means that trying to set default permissions for any content type with a name longer than 17 characters will generate errors.
I found some general discussion of this issue here: http://drupal.org/node/62673
I chose to just alter the variable table to support longer names, but something needs to be done vis-a-vis this module -- if only warn users to use shorter names (not my idea of a real solution, but then I didn't create the problem with the Drupal DB schema / this module's variable naming conventions, however you want to look at it).
Pretty frustrating to install a module and have it broken (in more than one fundamental way -- http://drupal.org/node/50728) out of the box.
Comments
Comment #1
jondoesdrupal commentedI'll address this issue in the 5.x version.
Comment #2
deekayen commentedI'm assuming this bug is still relevant to 4.7.x, but in Drupal 5, the variable table allows 128 chars instead of just 48.
Comment #3
deekayen commentedI'm not really sure how to address this issue. Here are some of the solutions I see:
drupal_set_message()and thenform_set_error()instead of saving if the name is too long.I'm inclined to pick the later since I don't know how a 128 change could impact the auto upgrade to Drupal 5 and turning the module off for long names seems more like a cop-out. How was your upgrade experience to Drupal 5 (if you did one) after you did the size change manually?
Comment #4
deekayen commentedafter no response, I added docs about this issue to README.txt, and I'm marking it won't fix because I think the right solution is to make the column 128 characters, and I would much rather have the auto upgrade script to Drupal 5 not have the chance to trip up on that.