SQL error on install, inoperative after
| Project: | Menu per Role |
| Version: | 5.x-1.x-dev |
| Component: | Miscellaneous |
| Category: | bug report |
| Priority: | critical |
| Assigned: | Unassigned |
| Status: | fixed |
Jump to:
When I enabled the menu per role module, I got this error:
All parts of a PRIMARY KEY must be NOT NULL; If you need NULL in a key, use UNIQUE instead query: CREATE TABLE if not exists menu_per_role ( mid int(10) unsigned, rid int(10) unsigned, PRIMARY KEY(mid, rid) ) TYPE=MyISAM /*!40100 DEFAULT CHARACTER SET utf8 */; in /var/www/html/drupal/includes/database.mysql.inc on line 172.
So I went in by hand, and ran this:
CREATE TABLE if not exists menu_per_role ( mid int(10) unsigned NOT NULL, rid int(10) unsigned NOT NULL, PRIMARY KEY(mid, rid) ) TYPE=MyISAM /*!40100 DEFAULT CHARACTER SET utf8 */;
No further errors, but when I set permission on a menu item... nothing happens! The item still appears for all users.

#1
Have you applied menu_per_role_drupal.patch?
#2
Ah, I actually just took the most updated version; I didn't see the patch. In the end, I resorted to creating a separate block for my "manager" user's menu. Too bad, woulda been useful. I'll try this solution again next time it comes up.
#3
so then I close this.