{"action":"created","issue":{"url":"https://api.github.com/repos/divio/django-cms/issues/3936","labels_url":"https://api.github.com/repos/divio/django-cms/issues/3936/labels{/name}","comments_url":"https://api.github.com/repos/divio/django-cms/issues/3936/comments","events_url":"https://api.github.com/repos/divio/django-cms/issues/3936/events","html_url":"https://github.com/divio/django-cms/issues/3936","id":60503509,"number":3936,"title":"CMSAttachMenu failing to register after 3.0.12","user":{"login":"mrhanlon","id":630606,"avatar_url":"https://avatars.githubusercontent.com/u/630606?v=3","gravatar_id":"","url":"https://api.github.com/users/mrhanlon","html_url":"https://github.com/mrhanlon","followers_url":"https://api.github.com/users/mrhanlon/followers","following_url":"https://api.github.com/users/mrhanlon/following{/other_user}","gists_url":"https://api.github.com/users/mrhanlon/gists{/gist_id}","starred_url":"https://api.github.com/users/mrhanlon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrhanlon/subscriptions","organizations_url":"https://api.github.com/users/mrhanlon/orgs","repos_url":"https://api.github.com/users/mrhanlon/repos","events_url":"https://api.github.com/users/mrhanlon/events{/privacy}","received_events_url":"https://api.github.com/users/mrhanlon/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/divio/django-cms/labels/blocker","name":"blocker","color":"eb6420"},{"url":"https://api.github.com/repos/divio/django-cms/labels/component:%20menus","name":"component: menus","color":"fef2c0"},{"url":"https://api.github.com/repos/divio/django-cms/labels/kind:%20bug","name":"kind: bug","color":"c7def8"},{"url":"https://api.github.com/repos/divio/django-cms/labels/status:%20accepted","name":"status: accepted","color":"0052cc"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":17,"created_at":"2015-03-10T14:02:03Z","updated_at":"2015-05-06T09:25:26Z","closed_at":"2015-04-04T12:38:15Z","body":"I noticed that after upgrading from 3.0.10 to 3.0.12 that a CMSAttachMenu was not registering on a page. It would periodically appear and disappear. In the advanced settings sometimes I would see zero, one, or two options for the same menu. I only have one CMSAttachMenu menu defined in a single app in my project. I attempted to delete and recreate the page to no avail. I noticed in the database, if there was only one option available in advanced settings, the page record showed `UserMenu` for `navigation_extenders`. If there were two options, it would be `UserMenu:190` or `UserMenu:193` depending which option I selected.\r\n\r\nUltimately I reverted to 3.0.10 and the issue went away.\r\n\r\nMy menu class:\r\n\r\n```python\r\nfrom menus.base import NavigationNode\r\nfrom cms.menu_bases import CMSAttachMenu\r\nfrom menus.menu_pool import menu_pool\r\nfrom django.utils.translation import ugettext_lazy as _\r\n\r\nclass UserMenu(CMSAttachMenu):\r\n\r\n    name = _('User Menu')\r\n\r\n    def get_nodes(self, request):\r\n        nodes = []\r\n\r\n        menu_id = 1\r\n        root_id = menu_id\r\n\r\n        # root node\r\n        greeting = 'Hello, {0}'.format(request.user.get_full_name() or request.user) if request.user.is_authenticated() else 'Log in'\r\n        title = '<i class=\"fa fa-user hidden-xs hidden-md hidden-lg\"></i><span class=\"hidden-sm\">{0}</span>'\r\n        n = NavigationNode(title.format(greeting), \"/user/\", menu_id)\r\n        nodes.append(n)\r\n\r\n        # anonymous menus\r\n        menu_id += 1\r\n        n = NavigationNode(_('Log in'), \"/login/\", menu_id, root_id, attr={'visible_for_authenticated':False})\r\n        nodes.append(n)\r\n\r\n        menu_id += 1\r\n        n = NavigationNode(_('Register'), \"/register/\", menu_id, root_id, attr={'visible_for_authenticated':False})\r\n        nodes.append(n)\r\n\r\n        menu_id += 1\r\n        n = NavigationNode(_('Help'), \"/help/ticket/new/guest/\", menu_id, root_id, attr={'visible_for_authenticated':False})\r\n        nodes.append(n)\r\n\r\n        # authenticated menus\r\n        menu_id += 1\r\n        dashboard_id = menu_id\r\n        n = NavigationNode(_('Dashboard'), \"/user/dashboard/\", menu_id, root_id, attr={'visible_for_anonymous':False})\r\n        nodes.append(n)\r\n\r\n        menu_id += 1\r\n        n = NavigationNode(_('Log out'), \"/logout/\", menu_id, root_id, attr={'visible_for_anonymous':False})\r\n        nodes.append(n)\r\n\r\n        # user section dashboard sub-menu\r\n        menu_id += 1\r\n        n = NavigationNode(_('Dashboard'), \"/user/dashboard/\", menu_id, dashboard_id, attr={'visible_for_anonymous':False})\r\n        nodes.append(n)\r\n\r\n        menu_id += 1\r\n        n = NavigationNode(_('Projects'), \"/user/projects/\", menu_id, dashboard_id, attr={'visible_for_anonymous':False})\r\n        nodes.append(n)\r\n\r\n        menu_id += 1\r\n        n = NavigationNode(_('Help Desk'), \"/user/help/\", menu_id, dashboard_id, attr={'visible_for_anonymous':False})\r\n        nodes.append(n)\r\n\r\n        menu_id += 1\r\n        n = NavigationNode(_('Profile'), \"/user/profile/\", menu_id, dashboard_id, attr={'visible_for_anonymous':False})\r\n        nodes.append(n)\r\n\r\n        return nodes\r\n\r\nmenu_pool.register_menu(UserMenu)\r\n```"},"comment":{"url":"https://api.github.com/repos/divio/django-cms/issues/comments/99396268","html_url":"https://github.com/divio/django-cms/issues/3936#issuecomment-99396268","issue_url":"https://api.github.com/repos/divio/django-cms/issues/3936","id":99396268,"user":{"login":"dzonder","id":814547,"avatar_url":"https://avatars.githubusercontent.com/u/814547?v=3","gravatar_id":"","url":"https://api.github.com/users/dzonder","html_url":"https://github.com/dzonder","followers_url":"https://api.github.com/users/dzonder/followers","following_url":"https://api.github.com/users/dzonder/following{/other_user}","gists_url":"https://api.github.com/users/dzonder/gists{/gist_id}","starred_url":"https://api.github.com/users/dzonder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dzonder/subscriptions","organizations_url":"https://api.github.com/users/dzonder/orgs","repos_url":"https://api.github.com/users/dzonder/repos","events_url":"https://api.github.com/users/dzonder/events{/privacy}","received_events_url":"https://api.github.com/users/dzonder/received_events","type":"User","site_admin":false},"created_at":"2015-05-06T09:25:26Z","updated_at":"2015-05-06T09:25:26Z","body":"I still see issues with app menus in 3.1.\r\n\r\nLets assume app is available as page at /shop/ and app menus contains available products.\r\nWhen accessing urls which are not in app menus (i.e. /shop/addresses/, /shop/addresses/add) everything works fine and menu is visible.\r\nBut when accessing product (i.e. /shop/product/pslug1) app menus disappear.\r\n\r\n3.0.10 worked fine but I needed Django>=1.7 support.\r\n\r\nIs anyone still working on this?"}}