Apply fixes from cloudmenu to avoid JS errors on pages without widget info.