I currently have a wagtail 5.1 project where there's a need to hide the promote tab.
I'm hiding the tab like this:
from wagtail.admin.panels import (
TabbedInterface,
ObjectList,
...
)
...
edit_handler = TabbedInterface([
ObjectList(content_panels, heading='Content'),
ObjectList(Page.promote_panels, heading='Promote', permission="superuser"),
])
The problem is that, any user besides the wagtail admin cannot save the edited page.
A normal user with the group Moderator
or Editor
(or both) although he is not able to see the tab (what I want) he is not able to save the page because of the required slug in that tab.
Is there any workaround or am I stuck with this?
Thank you in advance.
I think I managed to find an answer to this.
At the end of the CustomClassPage add this:
Example:
After doing this and testing with a normal user he was able to edit and save the page.