Closed (fixed)
Project:
Organic Groups
Version:
5.x-1.x-dev
Component:
og.module
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
7 Feb 2007 at 10:05 UTC
Updated:
11 Mar 2007 at 00:47 UTC
Jump to comment: Most recent file
Comments
Comment #1
jax commentedThe screenshot after you hit preview.
Comment #2
skor commentedI get this too.
And a possibly related artifact: If I skip the preview, the post does not get displayed on the group page. Then if I edit the content, the audience checkbox is not checked.
Comment #3
skor commentedTook a tip from this issue, and went to Administer>>Organic Groups>>Organic Groups config>>Node Authoring Form and set Audience: Required.
That fixed it for now.
Comment #4
jax commentedIf I put it to required it only changes that I get an error about it (see screenshot).
One fix is to replace:
in og_form_add_og_audience() by:
That does it for me but it's not the correct fix. I think the problem is that this form element:
is not picked up after the submit. It has also dissapeared from $form.
Comment #5
recidive commentedThe problem is with that check:
The
$gidsarray is passed by the query string, but it doesn't pass the above check when the form is submitted, so$gidsis not instantiated, causing the error.To reproduce this you need to configure og's node authoring form with 'Audience checkboxes' disabled, 'Audience required' as required and have a normal (authenticated user with the required permissions to post on a group) with at least 2 group subscriptions. Then try to create a node (page, story, etc) using the og details block.
I'm attaching a patch to fix this for 4.7 but this also affects the 5.x versions of og.module.
Comment #6
Luca Lenardi commentedI have the same problem on drupal 5.
I also noticed that when "Audience checkboxes" is checked, og doesn't write anything on the "node_access" table.
Comment #7
moshe weitzman commentedI can reproduce this now, but I'm too tired to figure it out. The audience code has become too complicated for my taste. I am considering removing the option to disable the audience checkoxes and always showing them. This 'simple' mode is a real headache in the code.
The proposed patch won't work. It won't let you deviate from the gids that are pased on the querystring, even after a preview.
Comment #8
moshe weitzman commentedi added some more crufty code to handle this. hopefully i got it right. this code is stinkyand must be exorcised. yell now if you really like the simple mode that 'audience checkboxes' disabled is important to you.
Comment #9
jax commentedWell, I don't want my users to be able to modify the group a message was posted to. So the group checkboxes should never be visible. I think the only way that is possible is with that simple mode....
Comment #10
moshe weitzman commentedThis mode is not intended as access control for audience form element. It is a UI simplification, and can be worked around. If you want people to be able to edit posts but not edit audience, you need a custom module with hook_form_later() to enforce that.
Comment #11
somebodysysop commentedWhat's going on with this? Just downloaded and installed og.
Went to Administer › Organic groups › Organic groups configuration
Configured "Node authoring form".
1. Enable "Audience checkboxes"
2. Under "Visibility of posts", ticked on "Visibility chosen by author/editor using a checkbox on the posting form. Checkbox defaults to Public."
3. For "Audience required:", ticked on "optional"
But, when I go to "create->page", there is a checkbox for each page, but no Public access checkbox, and the content is available to all users. What do I need to do to fix this?
Comment #12
somebodysysop commentedOh, man, this is wierd!
Just for the heck of it, I went back to Home » Administer » Organic groups -> Node authoring form, and selected under
Visibility of posts:
Visible only within the targeted groups
When I go back to create -> page, I now see the "Public" box.
I have attached both screens. This must definately be a bug!
I just downloaded and installed this version today: http://ftp.osuosl.org/pub/drupal/files/projects/og-5.x-1.0.tar.gz
Help!
Comment #13
(not verified) commented