I enabled organic groups, created a new content type, made that content type a group, added a new node/group, clicked save.
The checkbox then shows on the node edit form, when checked I click save.
Click edit again, the checkbox is still unchecked and no tab is show to edit terms.
Not sure if it has anything to do with the checkbox validate plugin..
http://drupal.org/node/342542
or something specific to my install.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | og_legal.575328.patch | 1.03 KB | spiderman |
Comments
Comment #1
niles commentedComment #2
niles commentedThe check box doesnt stay 'checked', and with each save, another row is added to the database.
I now simply delete any row with a zero, as I dont have time to debug the sql query.
please advise.
Comment #3
spidermanI've tracked this down to a lack of primary key on the og_legal table, which meant that updating the table when the revision flag was off would result in multiple rows being added for the same nid/vid combination. On loading the group node again, only the first would be retrieved.
I've corrected this by adjusting the hook_schema to include a unique key of nid/vid, so that when the hook_nodeapi update/insert ops fire, they will adjust any existing rows with the same nid/vid, rather than create a new entry.
Note that I had trouble with the hook_update_N() implementation in my patch, since the og_legal table already had rows which contradicted the unique key it tries to add. For me, this meant removing any rows with the same nid/vid before hitting update.php. You could also try just completely uninstalling the module, and then re-installing, but either way you will end up having to edit your group nodes to set the flag once more.