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

rockitdev’s picture

Title: JavaScript Error on Edit Node Pages » JS Error when Audience becomes a Select

OG 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.

marcp’s picture

There's a bug in the toggleSelect function. I'm still debugging, but changing the one line of that function to:

    toggle($('select.og-audience').val());

may be all that's necessary. Still needs more testing, though.

rockitdev’s picture

this 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).

marcp’s picture

@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?

rockitdev’s picture

@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.

jide’s picture

Thanks for reporting, I'll test this.

pfrenssen’s picture

Issue summary: View changes
Status: Active » Closed (outdated)

Closing, 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.