Probably an error with the group user query. Investigating...

Comments

webchick’s picture

Status: Active » Fixed

Pretty simple fix. Needed to change if ($row->grant_view) { to if ($row->is_active) {

Also updated the invite check while I was poking around in here to match what the og module uses.

netlynx’s picture

I can confirm this is a bug on my new install.

netlynx’s picture

Sorry - just noticed its fixed. But when I apply this it hits the next section of code and throws a wobbly.
i.e.
Fatal error: Call to undefined function: og_create_links() in /home/www/drupal/modules/contributions/modules/gojoingo/modules/gjg/group_block.module on line 99

This is because it is now calling code not previously called because we are now 'active'.
Any idea why this function does not exist? It exists in og.module - I am still struggling to get to grips with your extensive module - have I missed something?

        if ($row->is_active) {
          $subscription = 'active';
        }
        else {
          $subscription = 'requested';
        }
      }
    }
    $links = array();
    if ($subscription == 'active') {
      $links = og_create_links($node);
      $links[] = l(t('my subscription'), "og/manage/$node->nid");
      if ($node->og_selective == OG_OPEN || db_result(db_query("SELECT grant_update FROM {node_access} WHERE realm = 'og_uid'
 AND gid = %d AND nid = %d", $user->uid, $node->nid))) {
        $links[] = l(t('invite friend'), 'og/invite/'. $node->nid, array(), drupal_get_destination());
      }
webchick’s picture

Ah yes. In the newest copy of the OG module, that function has been renamed og_og_create_links().. it was made into a hook. Sorry about that. I remember fixing that but forgot to mention it here.

netlynx’s picture

Just to complete this thread - yes changing the name of the function works fine.

Anonymous’s picture

Status: Fixed » Closed (fixed)