jazzband / wagtailmenus

An app to help you manage and render menus in your Wagtail projects more effectively
MIT License
398 stars 138 forks source link

Warning W002: MainMenu.content_panels and MainMenu.settings_panels have no effect on snippets editing #501

Closed SerhiiKruhlikov closed 1 month ago

SerhiiKruhlikov commented 1 month ago

After updating to the latest version of wagtailmenus, I still receive warnings in the Django system check related to the MainMenu model.

The warnings are:

wagtailmenus.MainMenu: (wagtailadmin.W002) MainMenu.content_panels will have no effect on snippets editing
        HINT: Ensure that MainMenu uses `panels` instead of `content_panels`or set up an `edit_handler` if you want a tabbed editing interface.
There are no default tabs on non-Page models so there will be no Content tab for the content_panels to render in.
wagtailmenus.MainMenu: (wagtailadmin.W002) MainMenu.settings_panels will have no effect on snippets editing
        HINT: Ensure that MainMenu uses `panels` instead of `settings_panels`or set up an `edit_handler` if you want a tabbed editing interface.
There are no default tabs on non-Page models so there will be no Settings tab for the settings_panels to render in.

Steps to Reproduce:

  1. Install the latest version of wagtailmenus.
  2. Run python manage.py check.
  3. The warnings appear regarding content_panels and settings_panels in the MainMenu model.

Expected Behavior: No warnings should appear when using the MainMenu model with Wagtail menus. The model should use panels instead of content_panels and settings_panels for proper snippet editing.

Environment:

Possible Solution: The MainMenu model should use panels instead of content_panels and settings_panels since it is a snippet and not a page model. Alternatively, the edit_handler could be set up if a tabbed interface is desired.

MrCordeiro commented 1 month ago

Hi @SerhiiKruhlikov,

We are aware of these warnings and we are treating them as false positives

We are following this issue on #464

There isn't a good fix for this yet (sorry). There are some workarounds on #464 that might be useful.

As for now, I'm closing this issue as it's a duplicate. Feel free to reopen #464 if you have any updates.