webiny-js
webiny-js copied to clipboard
Default Page Builder theme breaks page rendering if main menu is not present
Version
5.30
Operating System
MacOs
Browser
Safari
What are the steps to reproduce this bug?
Delete the main-menu from the page builder and try to preview a page. You get a blank page with errors in the console.
What is the expected behavior?
Page to be rendered correctly.
What do you see instead?
Blank screen
Additional information
The default theme expects that there is a menu with main-menu slug present. If such a menu doesn’t exist, it breaks the page rendering.
Possible solution
Inside the theme we need to add a check if a menu exists, and a check to see if the menu has any items.
How can I recreate this main menu?
@SvenAlHamad how can i recreate the main menu?
@rajkumarks7 it's in the main admin navigation; create a menu with slug main-menu:

