jazzband / wagtailmenus

An app to help you manage and render menus in your Wagtail projects more effectively

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Multiple Sites?

lanshark opened this issue · comments

Hey all,

I'm using wagtailmenus in a multiple site setup. But I'm getting an error IF I try to show a main menu on the tenant site (not the primary) which has sub-menus. I try to create a new main menu, and as long as I only put 'top-level' items in the menu, it works fine. It works fine if I put pages that have sub-pages, as long as I uncheck the 'allow sub-menu for this item' page. And main menus on the primary site work fine.

But if I try to show dropdowns, I get :

AttributeError at /

'NoneType' object has no attribute 'page_children_dict'
Request Method: GET
https://tenant-2.xxx.com/
4.1.3
AttributeError
'NoneType' object has no attribute 'page_children_dict'

/srv/sites/python3.8/site-packages/wagtailmenus/models/menus.py, line 890, in init
wagtail.views.serve

/usr/bin/python3.8
3.8.10

Mon, 12 Dec 2022 09:08:52 -0600

It appears to be coming from this line:

  •         </details>
          
        </li>
      
        
        <li class="frame user">
          
            <code class="fname">/srv/sites/lfc/envs/lfc-py3.8-dj4.1-wag4.1-221115-2126/lib/python3.8/site-packages/wagtailmenus/models/menus.py</code>, line 890, in __init__
          
    
          
            <div class="context" id="c139812813502848">
              
                
              
              <ol class="context-line" start="890">
                <li onclick="toggle('pre139812813502848', 'post139812813502848')"><pre>        self.page_children_dict = original_menu.page_children_dict</pre> <span>…</span></li>
              </ol>
              
                
              
            </div>
          
    
          
            
              <details open="">
                <summary class="commands">Local vars</summary>
    

    Variable | Value --
    max_levels | 3
    original_menu | None
    parent_page | <ContactPage: Contact Us>
    self | <wagtailmenus.models.menus.SubMenu object at 0x7f28b52661c0>

    Has anyone used wagtailmenus on a multi-tenant site, and had submenus on the tenant pages?