To start with: I think your module is the killer application Drupal needs re access control. (I liked also the discussion between you and Rico very much!)

QUESTION 1
= I installed the OG User Roles module and it crashed my Drupal site.

= I had the "Workflow access" ( another great access control module) installed. Once both modules were uninstalled (by setting the switches in the systems table to 0), the site worked again. However, I couldn't access the /admin/user/access page anymore (Error 500 etc.), even after running update.php and the cron maintenance test. I still can access the permission settings through 'roles' and 'edit permissions' So I suspect that there is something changed in the URL of that page, but I couldn't figure out what.

Q.: How can I get access to the /admin/user/access page again?

Q.: Am I right to conclude that the "Workflow access" and OG User Roles modules clash? If so,
1. My suggestion is to mention that in the README.TXT file and on the Project page.
2. I or other people will post a feature request about co-operation between the two modules.

QUESTION 2:
I reinstalled the OG User Roles module and I could get all the access permissions set the way I wanted them. That is how far I got it working.
Reading then the README file I discovered that 'Clean URL' needs to be switched on. This is impossible with my host provider.

Q.: Am I right to conclude that the requirement of 'Clean URLs' is still valid?
If so,
1. My suggestion is to mention that on the Project page as well.
2. I or other people will post a feature request about making it possible to use the module on 'unclean' host providers.

I hope this feedback and questions prove to be useful to you and the many other future users of the OG user roles module.

Al the best,

JP

Comments

somebodysysop’s picture

Version: 5.x-1.4 » 5.x-1.5

I installed the OG User Roles module and it crashed my Drupal site

The only issue I've ever received of OG User Roles crashing a site was here: http://drupal.org/node/149843. This was resolved immediately. We can't know if it was OG User Roles which crashed your site (or if it was, why it did so) without some sort of error message.

Q.: How can I get access to the /admin/user/access page again?

You need to post this question in the general forum or Drupal core issues. Did you try clearing your cache? I can't imagine that either module would re-write the code that controls the callback to "access control". I know OG User Roles doesn't.

Q.: Am I right to conclude that the "Workflow access" and OG User Roles modules clash? If so,
1. My suggestion is to mention that in the README.TXT file and on the Project page.
2. I or other people will post a feature request about co-operation between the two modules.

I have no reason to believe that the two modules clash. I do have "Workflow 5.x-1.0" installed on a site that is also running OG User Roles and I've not had a problem. Without clear evidence that one module causes problems with the other, I can't rightly put such a statement in the README.txt file.

Q.: Am I right to conclude that the requirement of 'Clean URLs' is still valid?
If so,
1. My suggestion is to mention that on the Project page as well.
2. I or other people will post a feature request about making it possible to use the module on 'unclean' host providers.

First off, I believe that Clean URLs was a requirement for the same reason OG User Roles didn't support site subdirectories (see http://drupal.org/node/155882). The subdirectory issue has been resolved, so, therefore, should the Clean URL issue. I'm not %100 percent sure, but you can test it out by installing version 1.5 and seeing if it works in your environment.

To be on the safe side, I have placed a note on the OG User Roles project page for now that Clean URLs is a requirement.

jippie1948’s picture

Hi,

thanks for your quick response.

I tried to install the 1.5 version. Results: internal server error 500 in module page, admin/user/access page, 'status report' page.

I got the web site running again by removing the 'ug_user_roles' record from the system table. All the pages, apart from the admin/user/access page, are visible again.

Some more hopefully helpful info. I have the Autopath module installed and 'Clean URL' is not available on my server.

The other bits I haven't looked into it yet, as I can get 'away' with accessing permissions through the role page.

Thanks,

JP

somebodysysop’s picture

Clearly something is going on, but just what is still not clear. Could you ask your ISP to give you the httpd error log entries for the time period when you received the "Internal Error"?

Do you see anything in your Drupal logs? Usually there is some message indicating, if nothing else, what specific program or file is generating the error.

Also, when do you get the error? As soon as the module is installed? When you attempt to go to a specific page? When you click on a specific link?

Again, based upon the code in the module, no reason to believe that it could be crashing your site in and of itself alone. I'll try it on a site without clean urls myself and see if I get similar behavior.

will kirchheimer’s picture

Just a thought,

Check your user table, and make sure you still have a user "1"

We could never track it down during our testing, but at one point our User 1 was some deleted. We where testing tons of stuff at the time, but most of it revolved around OG. We could never track down what caused it.

somebodysysop’s picture

I took a site, disabled clean urls, loaded og, og_forum, og_user_roles. Created group and group content and user roles. No crashes or errors. Even the section where we actually do change the url, ognodeadd (node creation), works.

So, the good news is that og_user_roles will work on sites with clean urls disabled. The bad news is that I still have no idea about what is crashing your site. You'll need to give us some more info from your logs.

bibo’s picture

jippie1948, did you happen to run "og_users_roles.sql"? If yes, I'd guess that was the cause of the problem.

As I was wondering about this, I briefly checked all files with the latest release, and "og_users_roles.sql" looks like this:

-- Drupal dba.module database dump
--
-- Database: drupal03
-- Date: Sunday, February 25, 2007 - 14:44

--
-- Table structure for table 'og_users_roles'
--

CREATE TABLE og_users_roles (
  uid int(10) unsigned NOT NULL default '0',
  rid int(10) unsigned NOT NULL default '0',
  gid int(10) unsigned NOT NULL default '0',
  PRIMARY KEY  (uid, rid, gid)
) TYPE=MyISAM;

--
-- Dumping data for table 'og_users_roles'
--

INSERT INTO og_users_roles VALUES("1","4","55");
INSERT INTO og_users_roles VALUES("1","4","66");
INSERT INTO og_users_roles VALUES("1","4","71");
INSERT INTO og_users_roles VALUES("1","4","72");
INSERT INTO og_users_roles VALUES("1","5","55");
INSERT INTO og_users_roles VALUES("1","5","65");
INSERT INTO og_users_roles VALUES("1","5","67");
INSERT INTO og_users_roles VALUES("1","5","72");
INSERT INTO og_users_roles VALUES("1","5","96");
INSERT INTO og_users_roles VALUES("3","4","65");
INSERT INTO og_users_roles VALUES("3","4","72");
INSERT INTO og_users_roles VALUES("3","4","96");
INSERT INTO og_users_roles VALUES("3","5","55");
INSERT INTO og_users_roles VALUES("3","5","66");
INSERT INTO og_users_roles VALUES("3","5","71");
INSERT INTO og_users_roles VALUES("4","5","55");
INSERT INTO og_users_roles VALUES("4","5","65");
INSERT INTO og_users_roles VALUES("4","5","72");
INSERT INTO og_users_roles VALUES("4","5","96");
INSERT INTO og_users_roles VALUES("5","4","71");
INSERT INTO og_users_roles VALUES("5","5","72");
INSERT INTO og_users_roles VALUES("7","4","67");
INSERT INTO og_users_roles VALUES("7","5","55");
INSERT INTO og_users_roles VALUES("7","5","65");
INSERT INTO og_users_roles VALUES("7","5","67");
INSERT INTO og_users_roles VALUES("7","5","72");
INSERT INTO og_users_roles VALUES("7","5","96");
INSERT INTO og_users_roles VALUES("9","5","96");
INSERT INTO og_users_roles VALUES("10","5","72");
INSERT INTO og_users_roles VALUES("13","5","96");
INSERT INTO og_users_roles VALUES("14","5","96");

I would say that the lines with "INSERT INTO og_users_roles VALUES("x","x","x");" shouldn't be there and were included by accident. If you have less than 5 roles (or less than 14 users, or less than 96 nodes), I believe having those rows in your DB would mess your site up :P

If you never used the sql (which apparently is pretty old too), and just installed the module normally, and didn't have "og roles" installed previously, I can't think of another cause, except maybe something with cache. The "undefined function arg()" ()-issue (http://drupal.org/node/149469), occurred with drupal caching on + anonymous user accessing the page (the pages are only cached for anynomous). That time login wasnt possible at all, until I tried another browser (or another PC, can't remember) which had an cookie active that let me login, and then deactivate the module.

That issue was completely solved, but caching often causes weird errors, and I at least don't have cache on anymore (not during site development).

jippie1948’s picture

#3 submitted by SomebodySysop on July 10, 2007 - 19:10 updated

Clearly something is going on, but just what is still not clear. Could you ask your ISP to give you the httpd error log entries for the time period when you received the "Internal Error"?

Today, tomorrow and Thursday I am very busy with my work. So I have postponed this one. But see also below: I very quickly made a new test site.

Do you see anything in your Drupal logs? Usually there is some message indicating, if nothing else, what specific program or file is generating the error.

I got this error message:
"Table 'DRUP_HIA_og_users_roles' already exists query: CREATE TABLE DRUP_HIA_og_users_roles ( uid int(10) unsigned NOT NULL DEFAULT '0', rid int(10) unsigned NOT NULL DEFAULT '0', gid int(10) unsigned NOT NULL DEFAULT '0', PRIMARY KEY (uid, rid, gid) ) /*!40100 DEFAULT CHARACTER SET utf8 */; in /homepages/28/d41073845/htdocs/drupal/includes/database.mysql.inc on line 172."

Also, when do you get the error? As soon as the module is installed? When you attempt to go to a specific page? When you click on a specific link?

When I saved the admin/build/modules page.

Again, based upon the code in the module, no reason to believe that it could be crashing your site in and of itself alone. I'll try it on a site without clean urls myself and see if I get similar behavior.

I created a new site without clean URLs and the og_user_rules module installed perfectly. I haven't tested it yet. So I suspect that there might have been an interaction with one of the many other modules I have installed. I will test that one later as well. By the way, both sites work with URLS of the www.subdomain.domain.org.uk type.

#4 submitted by pixiedelion on July 10, 2007 - 19:42 updated

Just a thought, Check your user table, and make sure you still have a user "1"
We could never track it down during our testing, but at one point our User 1 was some deleted. We where testing tons of stuff at the time, but most of it revolved around OG. We could never track down what caused it.

I checked it, but both user 1 and 0 zero are OK. After removing the the og_users_role line in the system module, everything apart from admin/user/access page works fine.

#6 submitted by bibo on July 10, 2007 - 21:43 updated

jippie1948, did you happen to run "og_users_roles.sql"? If yes, I'd guess that was the cause of the problem.

No, even when I was looking for different ways of installing the module (.14) I didn't think it was good idea to use this sql file as it seemed to be filled with data from a different database.

I hope this information proves already useful to you. In about two-three days I will do the testing wether some of the other modules is interacting.

I hope that you can come up in the meantime with another view of what might have happened.

Thanks,

JP

jippie1948’s picture

Me again. Out of curisosity I went back to all my php error logs.

This was the first one. If i remember the following happened:
I tried to install og_users_roles and that failed because I either forgot first to install og_forum or mimemail or both. When I then retried to install I got this error message:
" Table 'DRUP_HIA_og_users_roles' already exists query: CREATE TABLE DRUP_HIA_og_users_roles ( uid int(10) unsigned NOT NULL DEFAULT '0', rid int(10) unsigned NOT NULL DEFAULT '0', gid int(10) unsigned NOT NULL DEFAULT '0', PRIMARY KEY (uid, rid, gid) ) /*!40100 DEFAULT CHARACTER SET utf8 */; in /homepages/28/d41073845/htdocs/drupal/includes/database.mysql.inc on line 172."

If I remember this well, then it might be an idea first to check whether the required modules are installed before the og_users_roles table is created.

Clicking for the admin/user/access page gives the internal 500 error but no php error log entrance.

Thanks,

JP

jippie1948’s picture

I should go to bed now, but I feel a bit hooked :-).

last question today: If I would like to clean up the database itself, which tables, which fields in other tables should i remove and which other database data should I correct?

Thanks,

JP

somebodysysop’s picture

Thanks bibo! These lines:

INSERT INTO og_users_roles VALUES("1","4","55");
INSERT INTO og_users_roles VALUES("1","4","66");
INSERT INTO og_users_roles VALUES("1","4","71");
INSERT INTO og_users_roles VALUES("1","4","72");
INSERT INTO og_users_roles VALUES("1","5","55");
...

Should NOT be in og_user_roles.sql. This is definately an oversight on my part, and will be corrected in next release.

This was the first one. If i remember the following happened:
I tried to install og_users_roles and that failed because I either forgot first to install og_forum or mimemail or both. When I then retried to install I got this error message:
" Table 'DRUP_HIA_og_users_roles' already exists query: CREATE TABLE DRUP_HIA_og_users_roles ( uid int(10) unsigned NOT NULL DEFAULT '0', rid int(10) unsigned NOT NULL DEFAULT '0', gid int(10) unsigned NOT NULL DEFAULT '0', PRIMARY KEY (uid, rid, gid) ) /*!40100 DEFAULT CHARACTER SET utf8 */; in /homepages/28/d41073845/htdocs/drupal/includes/database.mysql.inc on line 172."

og_forum is a requirement for og_user_roles and the module cannot be installed without it. mimemail is optional, and only required if you select "Default Group Admin Notification for new subscribers.", which is not selected by default.

I don't think that the "create table" error would crash your site. I re-install packages all the time where the tables already exist. Furthermore, this error would hardly be responsible for destroying your admin/user/access page.

I think your problem lies elsewhere, that your installation of og_user_roles reveals a symptom of some other underlying root problem.

Hopefully someone more knowledgeable than me will be able to guide you on how to clean up your database.

jippie1948’s picture

Hi there,

to keep you updated. I set up a test web site, as simple as possible and then to extend it to find out where things might have gone wrong.

I found so far two problems:

1. When I give a child its parent as a child, which is possible, the site crashes with error 500. I have submitted this as a bug for OG_Subgroups.See http://drupal.org/node/159040

2. The combination Subgroups, Workflow + Workflow Access and OG User roles doesn't seem to work. A Subgroupmember who should have only read access according to a workflow state gets actually edit and delete access.

I have submitted this as a bug, see http://drupal.org/node/159146
There is also a sql dump of my test database.

All the best,

JPH

somebodysysop’s picture

So, our clean url issue is resolved here?

jippie1948’s picture

Hi SomebodySysop
Yes! Having '?' in the URL doesn't give any problems. By the way, I tested it with Autopath installed. I don't know what will happen if it wouldn't be installed.

All the best,

JP

somebodysysop’s picture

Status: Active » Fixed
jippie1948’s picture

Status: Fixed » Active

sorry to reopen it again.

I found out what is necessary to block the access to the user management-access control.(admin/user/access) page.

On the test site of which you got the dump, OG_User_roles is working fine, apart from permission problems, but the code itself seems to work fine, producing no problems. Then I installed the Biblio module and I lost access on the above settings page. The problem now is the other way around as I started this thread with: biblio had been installed and installing OG_User_roles 'caused'/was followed by the crashing and after de-installing OG_User_roles, the site worked again, but there was no access to the above mentioned page.

De-installing Biblio recovered the page access. So, apperently the Biblio module and the OG_user_role module don't get on well together.

To test this assumption I set up a new clean Drupal site, activated first the OG_User_roles and Workflow modules, and next Biblio. Guess what: Fine. No problems.... now searching for ways to crash this combination.

I thought you might want to know this. And I am deeply suspicious about the stability of the Drupal site I want to set up. Especially as there seems no clear path to migrate users and content from a crashed site to a new Drupal site.

Keep you updated.

JP

somebodysysop’s picture

De-installing Biblio recovered the page access. So, apperently the Biblio module and the OG_user_role module don't get on well together.

Without the httpd logs from your ISP which correspond with the crashes, it's impossible to know what is causing what to crash. Since both OG User Roles and Biblio are both working now, I suspect it is some setting in one or the other which triggers the crash. But, again, not knowing anything but what you've posted doesn't give us a lot to go on.

A 500 error would generate someting in the httpd log which might help us track down the issue. Please try and get this information.

jippie1948’s picture

In te web site where OG_User_Roles had been installed I reinstalled Biblio and got the following errors:

1. Feedback immediately on screen:
Fatal error: out of dynamic memory in yy_create_buffer() in /homepages/28/d41073845/htdocs/drupal/includes/theme.inc on line 78

Warning: MySQL client run out of memory query: SELECT sid FROM DRUP_HIA_sessions WHERE sid = 'a4abb6b75bb809c513f0a20487a52067' in /homepages/28/d41073845/htdocs/drupal/includes/database.mysql.inc on line 172

2. No PHP error in recent logs

3. Error log from ISP:
"17 Jul 2007 00:26:56","/homepages/28/d41073845/htdocs/drupal/includes/session.inc:
77","(Notice) Undefined property: cache"

By the way, all errors logs since I nstalled the error monitor program have the same error message...

I hope this info proves to be useful to you.

JP

somebodysysop’s picture

I hope this info proves to be useful to you.

For sure! Before I was just guessing, now I'm pretty certain the OG User Roles is not your problem.

"17 Jul 2007 00:26:56","/homepages/28/d41073845/htdocs/drupal/includes/session.inc:
77","(Notice) Undefined property: cache"

No where in OG User Roles is the property "cache" referred to. Check this out to see if this helps: http://drupal.org/search/node/%22Undefined+property%3A+cache%22

1. Feedback immediately on screen:
Fatal error: out of dynamic memory in yy_create_buffer() in /homepages/28/d41073845/htdocs/drupal/includes/theme.inc on line 78

Warning: MySQL client run out of memory query: SELECT sid FROM DRUP_HIA_sessions WHERE sid = 'a4abb6b75bb809c513f0a20487a52067' in /homepages/28/d41073845/htdocs/drupal/includes/database.mysql.inc on line 172

2. No PHP error in recent logs

Can't help you out here at all. But, sounds like you got some serious cache problems and your ISP needs to provide you with more memory to run your applications.

somebodysysop’s picture

Assigned: Unassigned » somebodysysop
Status: Active » Closed (fixed)

Closing this issue. Haven't heard anything back, and from the information provided, it did not appear to be an issue OG User Roles.