Closed (fixed)
Project:
GoJoinGo
Version:
4.6.x-1.x-dev
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Reporter:
Created:
21 Feb 2006 at 22:13 UTC
Updated:
8 Apr 2006 at 02:30 UTC
When trying to apply this mega patch three code patches fail because:
___________________________________________________________
1. In the original file this code (see comment) has changed from
}
// if a post isn't in any groups. it must be public
- if (empty($node->og_groups)) {
$node->og_public = 1;
}
}
to this
}
// if a post isn't in any groups. it must be public. this is the core reason why multiple node_access modules collide
if (empty($node->og_groups)) {
$node->og_public = 1;
}
}
AND ALSO
_______________________________________________________________________________
2. this code (see INSERT and new IF statement and new comment) has changed from
// put the post into each selected group
if (is_array($node->og_groups)) {
foreach($node->og_groups as $gid) {
$sql = "INSERT INTO {node_access} (nid, gid, realm, grant_view) VALUES (%d, %d, 'og_group', 1)";
db_query($sql, $node->nid, $gid);
}
}
// if the public checkbox was selected, give a universal grant for this node
- if ($node->og_public) {
$sql = "INSERT INTO {node_access} (nid, gid, realm, grant_view) VALUES (%d, 0, 'og_group', 1)";
db_query($sql, $node->nid);
}
to this code
// put the post into each selected group. we need a separate row for public and private nodes.
// for public nodes, the grant_view column indicates which group the node belongs to. The gid=0 always. Needed to get
// public nodes to display on the home page for non subscribers
if (is_array($node->og_groups)) {
foreach ($node->og_groups as $gid) {
$sql = "INSERT INTO {node_access} (nid, gid, realm, grant_view, grant_update, grant_delete) VALUES (%d, %d, 'og_subscriber', 1, 1, 1)";
db_query($sql, $node->nid, $gid);
if ($node->og_public) {
$sql = "INSERT INTO {node_access} (nid, gid, realm, grant_view) VALUES (%d, 0, 'og_public', %d)";
db_query($sql, $node->nid, $gid);
}
}
}
// if the public checkbox was selected, give a universal grant for this node
if ($node->og_public) {
$sql = "INSERT INTO {node_access} (nid, gid, realm, grant_view) VALUES (%d, 0, 'og_all', 1)";
db_query($sql, $node->nid);
}
___________________________________________________________________________
3. ..and this code (note 'og_group' changed to 'og_all'):
else {
// all group homepages are publically accessible, although their posts may not be
// if you really want a hidden group (i.e. inaccessible group homepage), you should go to node_access table and delete the record which is inserted here.
- $sql = "INSERT INTO {node_access} (nid, gid, realm, grant_view) VALUES (%d, 0, 'og_group', 1)";
- db_query($sql, $node->nid);
-
- // we INSERT a broad grant here but only og_node_grants() only issues it selectively
$sql = "INSERT INTO {node_access} (nid, gid, realm, grant_view, grant_update, grant_delete) VALUES (%d, %d, 'og_group', 1, 1, 1)";
db_query($sql, $node->nid, $node->nid);
to this code
else {
// all group homepages are publically accessible, although their posts may not be
// if you really want a hidden group (i.e. inaccessible group homepage), you should go to node_access table and delete the record which is inserted here.
$sql = "INSERT INTO {node_access} (nid, gid, realm, grant_view) VALUES (%d, 0, 'og_all', 1)";
db_query($sql, $node->nid);
// we INSERT a broad grant here but only og_node_grants() only issues it selectively
$sql = "INSERT INTO {node_access} (nid, gid, realm, grant_view, grant_update, grant_delete) VALUES (%d, %d, 'og_subscriber', 1, 1, 0)";
db_query($sql, $node->nid, $node->nid);
Comments
Comment #1
webchickThanks a lot for testing!
I'll be rolling a new patch within the next couple days. :)
Comment #2
webchickAssigning this to myself so it doesn't slip.
Also, making a mental note to include changes in:
http://drupal.org/node/49920
http://drupal.org/node/49239
Comment #3
webchickbump. working on this now.
Comment #4
mzabala commentedShould I hold off on installing GoJoinGo for now? I was about to install it, but after seeing this, I'm afraid it will break my site =)
So what's the good word on the status?
Comment #5
netlynx commentedIf your thinking of a live site I'd think very carefully.
Since the above comments a bucket load of changes have occured which have not been tested yet, including a big synch effort with the og module that is also moving at a rapid pace.
Its all very good stuff, but not really stable enough for a live site (and almost impossible to follow because so many changes are going on at the same time).
Having said that most of the problems are easy to fix in my experience (if you have some idea of php and drupal) so if you are in the mood its worth the effort.
I think the plan is to have some stability in the next month or so but if webchick keeps moving at her current pace she will have re-written Drupal by then.
So here's hoping it does calm down because I'm waiting in the wings myself to load up the latest and greatest.
(The above patches are all fixed so ignore the posts above).
Comment #6
webchickLOL :)
Actually, things are more or less stabilizing, I think. I still have a few invitations-related bugs and features to sort through, but as of the end of last week, most of the major development and subsequent clean-up work I'd been neglecting for awhile was done, for now. Marking this issue fixed per Netlynx's last comments.
One thing I should point out though is GoJoinGo is kind of two things:
1. First and foremost, an entire social networking-focused distribution of Drupal -- this is essentially what running the install script (+ forthcoming config script) will get you. See a sample site running this at http://connect.goodstorm.com/
2. Secondly, a collection of modules and patches to help add social networking capabilities to Drupal. As of right now, there is more work that could be done in generalizing these modules so they would work for many different uses... most of these have been listed in WISHLIST.txt. If anything sounds like something you'd like to tackle, I'd love to work with you. :)
If you're interested in trying it, I would give the install script a whirl and play with it a bit. It definitely should not blow anything up at this stage, but as with anything in contrib it's always worth having a test site around just in case. ;)
Comment #7
(not verified) commented