Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
As the title says "Organic Groups Register" doesn't show any groups to select on the registration page. My groups are public.
I noticed inside "og_register_form_user_register_form_alter", an empty array is returned by "og_register_get_groups".
I upgraded from Drupal 6 but completely removed OG, even removed all the tables and then reinstalled.
Comment | File | Size | Author |
---|---|---|---|
#6 | og_register.module.patch | 510 bytes | Andrew M Riley |
Comments
Comment #1
amitaibuYou should add og-register field to the group.
Comment #2
hoomanb CreditAttribution: hoomanb commentedThanks that was a good start, but didn't help:
First, in og_register.module, there is a
define('GROUP_REGISTER_FIELD', 'group_register');
Since the field name didn't start with 'field_' I had to manually add it.
Then I noticed another bug in og_register.module causing an error on the registration page:
The constant was sometimes called 'GROUP_REGISTER_FIELD' and sometimes 'OG_REGISTER_FIELD'.
Fixing that, the error is gone and now I have the field 'group_register' which is set to 1 for two of my public groups.
But the groups still don't show up on registration page.
Comment #3
radoeka CreditAttribution: radoeka commentedCan the description be adjusted, as it states:
"As the title says "Organic Groups Register" does show."
It should be doesn't show.
Thanks
Comment #4
hoomanb CreditAttribution: hoomanb commentedI wrote a module that does what I wanted OG to do, but just FYI this issue still exists.
Comment #5
amitaibu@hoomanb,
> Since the field name didn't start with 'field_' I had to manually add it.
The field doesn't need to be prefixed with "field_" (only the ones you add via field UI are prefixed).
> The constant was sometimes called 'GROUP_REGISTER_FIELD' and sometimes 'OG_REGISTER_FIELD'.
Thanks, fixed on github -- https://github.com/amitaibu/og/commit/761af019ff2e4369bd736a4fece3aeb23d... (I'll mark fixed once synced with CVS).
Comment #6
Andrew M Riley CreditAttribution: Andrew M Riley commentedUsing the 7.x-1.x-dev it turns out the og_register_group_fields_info function should be called og_register_og_fields_info. Once I changed this I had the option to add the Groups Register line item in Group Field Settings.
Comment #7
amitaibuCommitted to Drupal.org (#5)
Comment #9
Matt BOk, need a little help here - I have og-register enabled. I cannot see an og-register field in the group content type settings or in the Group field settings? Where do I find it and enable it?
Comment #10
Matt BComment #11
Matt BI've upgraded to the dev version, and now have the ability to add the registration field to the Group content type. I've selected 'Show on registration page' but there is no option on the registration page. og_register does not appear to work on either the 7.x-1.0 or 7.x.1.x-dev version.
Comment #12
amitaibuDo you have og_field_access enabled?
Comment #13
Matt BYes
Comment #14
amitaibuAnd did you check you have the permissions set correctly?
Comment #15
Matt BAs far as I can tell - I have non-members with the permission "Subscribe user to group". What are the correct permissions?
Comment #16
Matt BI've now made sure "View Group type field" is ticked for non members and I get a Groups audience list on the registration form with the help text "Select the groups this content should be associated with." - not the most user friendly text for registration. I'll test registration tomorrow...
Comment #17
amitaibu> not the most user friendly text for registration.
I encourage you to write a patch to change it :)
Comment #18
Matt BI'll look into it, the problem is that this is the same text used on the content forms, so presumably it's the same code and it wouldn't be a simple matter of changing a text string.
Comment #19
AndrzejG CreditAttribution: AndrzejG commentedI can't find og-register field, despite the module is enabled. Where is it?
The same for og_field_access.
Comment #21
pfrenssenI have been struggling with this too. I managed to get the groups to show up on the user registration form. Five ingredients are needed:
Good luck!
Comment #22
petednz CreditAttribution: petednz commentedpfrenssen -thanks for those steps - not sure why 5/ was eluding me, possibly because the system had been originally configured without needing people to 'register' for group (as all groups were 'closed')
so yes those steps work - and as noted by Matt B - this results in the Groups field showing at user/register with "select the groups this content should be associated with"
and i wondered why this wasn't coming from the "help text' at /admin/config/people/accounts/fields/group_audience so i threw something in here, and hey presto the default msg of "Select the groups this content should be associated with" disappears and I just see my 'help text'
(but i continue to get "Select the groups this content should be associated with" for the field where it is used on Content Types, since this is per Field, of course).
So perhaps we just need a 6. on the above list namely
6. Add your own 'help text' at /admin/config/people/accounts/fields/group_audience in order to replace the default message of 'Select the groups this content should be associated with'
Thanks everyone
Comment #22.0
petednz CreditAttribution: petednz commentedFixed polarity of statement