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.
By design, OG switches from checkboxes to a select box when there are more than 20 groups available in the audience fieldset.
When this switch occurs, and you have the ability to post in 20+ groups, on a node edit page, the menu settings are not rendered properly in the form (data seems to be there via firebug however), so just seems to be some form of a JS issue. What happens is, the menu will say not in menu and the delete this menu item checkbox is selected.
I verified the data in the db and all seems to look good, so just seems to be a JS rendering issue.
Comments
Comment #1
rockitdev CreditAttribution: rockitdev commentedOG Menu breaks when the OG Audience selector becomes a select item and not checkboxes.
This will happen when there are more than 20 possible audiences to select.
Comment #2
marcp CreditAttribution: marcp commentedThere's a bug in the toggleSelect function. I'm still debugging, but changing the one line of that function to:
may be all that's necessary. Still needs more testing, though.
Comment #3
rockitdev CreditAttribution: rockitdev commentedthis seems to work for simple audience selects.
One use case where this doesn't work, is if a user is in a role that has the administer nodes permission set to true. The select, is then split into option groups "My Groups" & "Other Groups".
When this happens, the Menu select works for the first group in the select, but does not work properly for any other group (even groups that the user is a member of, not just the groups that fall under the option group, other groups).
did some rough troubleshooting just outputting what values were being displayed in the JS functions, and all appeared normal, so i'm wondering if this is an issue in the actual module for this use case.
(Reason for a role having administer nodes perm is so that site admins do not have to be part of a group to manage the content).
Comment #4
marcp CreditAttribution: marcp commented@rockitdev - How does this relate to #1031716: Node gets removed from menu when user has 'administer nodes' but not 'administer menu'? Do your site admins also have 'administer menu' rights?
Comment #5
rockitdev CreditAttribution: rockitdev commented@marcp will take a look. Didn't notice that issue because i saw in my new D.O. dashboard there were new comments in my issue.
Comment #6
jide CreditAttribution: jide commentedThanks for reporting, I'll test this.
Comment #7
pfrenssenClosing, since the Drupal 6 version of OG Menu is no longer supported. If this issue is still relevant for the currently supported versions (D7 and D8) then feel free to update the version and reopen the issue.