This may be the same issue as [325559] but my error msg is a little different.
Warning: Table 'dru_watchdog' was not locked with LOCK TABLES query: INSERT INTO dru_watchdog (uid, type, message, severity, link, location, referer, hostname, timestamp) VALUES (11, 'php', '<em>Duplicate entry &#039;og_user_roles_assign_typegrouprole_group_generic&#039; for key 1\nquery: INSERT INTO dru_variable (name, value) VALUES (&#039;og_user_roles_assign_typegrouprole_group_generic_group&#039;, &#039;i:0;&#039;)</em> in <em>/var/www/vhosts/matrixleadership.com/httpdocs/community/includes/database.mysql.inc</em> on line <em>172</em>.', 2, '', 'http://matrixleadership.com/community/admin/og/og_user_roles', 'http://matrixleadership.com/community/admin/og/og_user_roles', '76.25.207.195', 1226111446) in /var/www/vhosts/matrixleadership.com/httpdocs/community/includes/database.mysql.inc on line 172
The msg above repeats 10 times on my screen. And all of the theme/formatting of the site is gone. just 10 identical error msgs on a blank white page. If I hit reload, the same screen shows. If I put my cursor in the URL address window of my browser and hit return, then the save operation appears to complete with the following error messages repeated 5 times in the pink error window.
# user warning: Duplicate entry 'og_user_roles_assign_typegrouprole_group_generic' for key 1 query: INSERT INTO dru_variable (name, value) VALUES ('og_user_roles_assign_typegrouprole_group_generic_group', 'i:0;') in /var/www/vhosts/matrixleadership.com/httpdocs/community/includes/database.mysql.inc on line 172.
# user warning: Duplicate entry 'og_user_roles_typegrouprole_value_group_generic_' for key 1 query: INSERT INTO dru_variable (name, value) VALUES ('og_user_roles_typegrouprole_value_group_generic_group', 's:1:\"6\";') in /var/www/vhosts/matrixleadership.com/httpdocs/community/includes/database.mysql.inc on line 172.
this may or may not be related to an outcome that is another problem.
I checked the box indicating the role that I want to have newly elevated group administrators to be given.
My check boxes and role assignment seem to stay correctly (when I next display the config page) ... but the role assignment does not happen when I actually promote a user to group administrator.
This worked for me with OGUR 5x-3.2. (I just switched to 3.3 today)
Thanks
| Comment | File | Size | Author |
|---|---|---|---|
| #8 | ogur-331701-1100486.patch | 4.22 KB | somebodysysop |
| #1 | ogur-331701.patch | 4.04 KB | somebodysysop |
Comments
Comment #1
somebodysysop commentedTry the attached patch against a clean (unpatched) download of version 5.x-3.3. It is a cumulative patch so it will contain all changes made to this point.
I don't know about the error messages. They don't seem directly related to OGUR. But, the patch should resolve the issue of the group administrator role not being saved in "configure member roles".
Comment #2
jackspiv commentedThanks for the quick patch !!!!
I just tried it and the patch failed. Maybe a line numbering issue??
Error from patch utility:
is it easy to fix maybe?
Comment #3
somebodysysop commentedI just tested the patch against a clean download of OG User Roles 3.3. Works fine.
Comment #4
jackspiv commenteddid you download from cvs or from the project page? does it matter?
Mine was clean from the project page.
the patchfile for user.module included with the download worked fine on the user.module file ... so I don't think its my system or method for executing the patch process.
I just downloaded a fresh copy of 3.3 from the project site with the same result.
???
Comment #5
somebodysysop commentedCan't fix what isn't broken on my end. You'll have to wait until I figure out how to release a .dev version. Or, you can apply the patch changes manually.
Comment #6
jackspiv commentedOk... I finally got it to patch ...Yeaaaaa!
(there is some kind of problem in my downloaded version of the patch ... getting occasional square boxes mixed into the text when viewed in notepad. Don't know if this is a problem with the patchfile that's linked to the download or some corruption in the transfer ... I tried it several times. I am on a windows machine; guessing youre on mac or unix? So I finally viewed the link directly in mozilla and copy/pasted the result into a notepad file directly and ...voilla. Good code without little boxes.)
So, the patch worked and the new patched version in fact gives the newly promoted group admin the specified group admin role as advertised. That's the good news.
Bad news (or less than good news...) when I demote the admin back to normal group member, the privilages assigned by OGUR are not reverted back to the non admin role.
Is this what you intended or does it still need a touch of work?
Thanks so much for being so dilligent about this. It's refreshing and delightful to be user testing and actually get this kind of rapid, effective, and supportive response.
Comment #7
jackspiv commentedAnd, FWIW in case anyone else is having the same error issues mentioned above.
I think I have some info, but no tested solution yet (working on it)
After a little(lot) of searching, came up with... #165227: Admin Settings Error -- Warning: Table 'watchdog' was not locked with LOCK TABLES
??? don't know why this came up as strikethru??????
Seems that the length of the variable created when OGUR concatenates its variable name to my longish group name might be a problem.
Notice in the error message above, the two versions of what are being called a duplicate entry:
og_user_roles_assign_typegrouprole_group_generic
og_user_roles_assign_typegrouprole_group_generic_group
The first is a truncated (48 char) truncated version of the second. I checked in my database using phpMySQLadmin and found that indeed the variable table had a 48 character length defined for name entries.
This seems like a very silly limitation specified on drupal install and will break anyone's module who has no way of controlling the length of a finished variable name that depends on an unlimited original.
Shorter names here (OGUR) might help (if this really is the issue), but it doesnt really solve the larger issue. (which someone said is resolved in V6)
I suppose i can try editing the name length max manually in the database, but I'm pretty sure that will come back to bite me when I update or upgrade drupal.
Whew!!!!!
Comment #8
somebodysysop commentedre: #6
Try attached patch. Again, this patch has to be applied against clean ogur 5.x-3.3 download.
re: #7
Can't simply rename the variable. Would need to create code that would locate the existing variables in existing installations and rename them as well. Right now, nothing comes to mind.
Comment #9
jackspiv commentedSomebodysysop you're a god.
Problem solved! (for me) I guess others may want to try the patch before closing the issue.
OGUR now (as patched) correctly confers the specified admin role access privilages when user is elevated to group admin and removes them when the group admin user demoted to "normal' group member.
FWIW, I also verified that this works correctly when multiple users are elevated to admin roles and that it does not alter other roles that these users are assigned either on promotion or demotion.
Great job. Hope others have the same results.
(I do wonder if I'm just the first to notice or if others don't experience my problem ...)
Thankyou.
Comment #10
somebodysysop commentedComment #11
tborrome commentedsubscribing .. .seeing same issue with 5.x.3.3 will try the patch.
Comment #12
tborrome commentedquestion ... can i get a combined patch with this and the one from:
http://drupal.org/node/329054
or how should apply the 2 patches on clean 5.x-3.3?
Comment #13
somebodysysop commentedAll the patches are cumulative. That is, the latest patch contains all code changes from any earlier patch as of 5.x-3.3 release.