webiny-js icon indicating copy to clipboard operation
webiny-js copied to clipboard

Default Page Builder theme breaks page rendering if main menu is not present

Open SvenAlHamad opened this issue 3 years ago • 1 comments

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.

SvenAlHamad avatar Aug 11 '22 20:08 SvenAlHamad

How can I recreate this main menu?

sljunior avatar Aug 30 '22 02:08 sljunior

@SvenAlHamad how can i recreate the main menu?

rajkumarks7 avatar Oct 11 '22 17:10 rajkumarks7

@rajkumarks7 it's in the main admin navigation; create a menu with slug main-menu:

CleanShot 2022-10-11 at 19 30 21

CleanShot 2022-10-11 at 19 30 52

Pavel910 avatar Oct 11 '22 17:10 Pavel910