Hi again.

Haven't been here in a while. Your module has been running beautifully for a while now.
Until, of course, the upgrade.

I tried upgrading OG to 5.x-8.0. Ran update.php and everything looks good except:
OGUR throws error on Organic Groups upgrade to 5.x-8.0

I tried upgrading OGUR to 5.x-3.4, and ran update.php, but same error.

warning: Attempt to assign property of non-object in /home/groupsal/public_html/sites/all/modules/og_user_roles/og_user_roles.module on line 2409.

Is OGUR compatible and tested with OG 5.x-8.0 ?

Anyone else seeing this?

Thanks,

Jack

My config FWIW

Drupal 5.12
Configuration file Protected
Cron maintenance tasks Last run 12 hours 21 min ago
You can run cron manually.
Database schema Up to date
Drupal core update status No update data available
No information is available about potential new releases for currently installed modules. To check for updates, you may need to run cron or you can check manually. Please note that checking for available updates can take a long time, so please be patient.
File system Writable (public download method)
JQuery Update Installed correctly
The current installed version of JQuery is 1.1.2
MySQL database 5.0.67
PHP 5.2.8
PHP register globals Disabled
Unicode library PHP Mbstring Extension
Web server Apache/2.2.11 (Unix) mod_ssl/2.2.11 OpenSSL/0.9.8b mod_bwlimited/1.4

Comments

somebodysysop’s picture

I believe this to be a duplicate of: http://drupal.org/node/356930

If so, then you should install the 5.x-3.x-dev module which fixes this in 5.x.

jackspiv’s picture

Thanks for your speed, SomebodySysop

I am testing the upgrades and compatibility on a pre-production sandbox site right now so I can do this.

I am preparing to do upgrades to my production site and normally avoid "dev" versions like the plague.

Do you think that this "dev" version is stable and ready for a production site?
When was the last "significant" change in dev and how many download/tests since then?
How far would you say this dev is from a numbered production release version?
What might make you hesitant to release it today?

Of the developers I've "met" here, you're way high on my list.
I'd really appreciate it if you could indulge my nervousness.
Privileges are nearly about as critical as it gets when it comes to site function.

Thanks for understanding,

Jack

somebodysysop’s picture

Do you think that this "dev" version is stable and ready for a production site?

Yes. I've had so much bad luck with patches that I now simply use the .dev releases for that. I maintain them as "stable" versions with new patches applied. I use them internally as I usually consider them the most recent stable versions (unless, of course, there's a problem with the patch).

When was the last "significant" change in dev and how many download/tests since then?

Look at the issue queue. http://drupal.org/project/issues/og_user_roles?states=all

You will see that most of the significant changes have been made to the 6.x version, not the 5.x version. I have made only a few modifications to 5.x since the release of 5.x-3.4.

What might make you hesitant to release it today?

The fear that 15 minutes later, somebody else will come up with a problem whose fix could have been included. Like you, I like the idea of if it ain't broke, don't fix it.

Of the developers I've "met" here, you're way high on my list.

Thank you. I'm not just a contributor, but a module user as well. The four things I can't stand from other module contributors:

1. Arrogance. Talking to people like they are stupid.
2. Half answers. I really can't stand it when I've been waiting 3 weeks for a response, and somebody responds with some flip one word answer that they think is cute, but doesn't help at all.
3. Ignoring issues. While I am guilty of this on another project, I really, really don't like it when my issue is ignored. Granted, there are some maintainers with thousands of users as opposed to OGURs few hundred.
4. Baseless criticism of other modules. I guess this would fall under arrogance. If I have a problem with someone else's module, I am first going to let that person know what the problem is. If that person responds with 1, 2 and/or 3 above, then I'll talk about them, but only from a standpoint of the facts.

So, I merely try to do unto others as I would like them to do unto me. I will say that while there are some bad apples, most Drupal developers I've run across have been courteous and professional, if not always prompt.

I'd really appreciate it if you could indulge my nervousness.

I can't promise you that you won't run into any problems. I can only tell you that I feel reasonably sure that you won't. Test it in your pre-production environment.

Or, if it will make you feel any better, just wait until I update the stable release. That should be soon.

jackspiv’s picture

Version: 5.x-3.4 » 5.x-3.5

Hi again,

Just installed OGUR 5.x-3.5

Looks like this error is still happening. I haven't tried backing up to the dev version again to check it out.

Did the fix above get into 3.5?

somebodysysop’s picture

Please provide the error and the line number.

jackspiv’s picture

Sorry SomebodySysop

Thought it was the same as above and it wasn't. Good that you asked.

warning: Attempt to assign property of non-object in /home/groupsal/public_html/sites/groupsalive.com.newtest01/modules/og_user_roles/og_user_roles.module on line 2420.

I guess that I didn't mention... this occurs when I simply visit an OG group homepage of any group (I've tried several, but not all actually)

and I did try reinstalling the "dev" version since the last post and it does eliminate the error msg.

Thanks

somebodysysop’s picture

What is on line 2420 of your copy of ogur?

jackspiv’s picture

2415  // Now, using $uid and $gid we find out what roles this user has in this group;
2416  //
2417  if (empty($gid)) {
2418    $gid = 0; // This prevents us from getting error on non-group node/add
2419  }else{
2420    $_SESSION['og_last']->nid = $gid;
2421    $_SESSION['og_user_role'] = $gid;
2422  }
2423
2424/*
2425 * Modification as per http://drupal.org/node/189227
2426 * Makes sure use is "active" (not in moderation) before any of these group roles are added.
2427 * Was: $query = 'SELECT r.rid, r.name FROM {role} r INNER JOIN {og_users_roles} ogr ON r.rid = ogr.rid WHERE ogr.uid = %d AND ogr.gid = %d';
2428 */
2429
2430  $query = 'SELECT r.rid, r.name FROM {role} r INNER JOIN {og_users_roles} ogr ON r.rid = ogr.rid INNER JOIN 2431{og_uid} ogu ON ogu.uid = ogr.uid AND ogu.nid = ogr.gid WHERE ogr.uid = %d AND ogr.gid = %d AND ogu.is_active = 1';
2432  $results = db_query($query, $uid, $gid);
somebodysysop’s picture

Yep, that would cause the error, since the way that object works changed in OG 5.x-8.0. Continue using the .dev module until it is corrected in next "stable" release.

jackspiv’s picture

thanks

somebodysysop’s picture

Status: Active » Patch (to be ported)
somebodysysop’s picture

Status: Patch (to be ported) » Fixed

Fixed in 5.x-3.x-dev. Will be committed to stable release soon.

somebodysysop’s picture

Assigned: Unassigned » somebodysysop

Code committed to 5.x-3.6 release.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.