Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove obsolete hard-coded publishing panel fields #440

Open
benfroelich opened this issue Dec 30, 2022 · 1 comment
Open

Remove obsolete hard-coded publishing panel fields #440

benfroelich opened this issue Dec 30, 2022 · 1 comment

Comments

@benfroelich
Copy link
Contributor

benfroelich commented Dec 30, 2022

wagtailmenus recreates wagtail's scheduled publishing (go-live and expiry) fields here:

menupage_settings_panels = [
MultiFieldPanel(
heading=_("Scheduled publishing"),
classname="publishing",
children=(
FieldRowPanel((
FieldPanel('go_live_at', classname="col6"),
FieldPanel('expire_at', classname="col6"),
)),
)
),
menupage_panel,
]

Furthermore MenuPage overrides, instead of appends to, Page's settings_panels:

class MenuPage(Page, MenuPageMixin):
settings_panels = menupage_settings_panels

So you end up with deprecated scheduled publishing fields and also excluded features such as privacy and comments which are now in a sidebar popout, at least in wagtail 4.1.1.

I believe the fix is to (1) append the wagtailmenus advanced menus fields to Page's settings_panels and (2) remove the duplicated scheduled publishing fields.

I am working on a PR now. Please let me know if I'm off on this. Thanks!

@benfroelich
Copy link
Contributor Author

BTW, for now the workaround I'm using until the official package gets updated is to override settings_panels as shown on my MenuPage derived models:

class BlogPost(MenuPage):
    # TODO: revert when wagtailmenus is updated
    settings_panels = Page.settings_panels + MenuPage.settings_panels
    ...

@benfroelich
Copy link
Contributor Author

#441

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant