I think there are a few mistakes such as:
getMenuItemsWithChilds()
error_log says Blesta doesn't know such a function. This line: $menu_items = $this->CmsPages->getMenuItemsWithChilds();
And we added menu items manually by changing body so why did we need to load menu items from cms I dont understand.
Edit: OK. I see why we trying to fetch menu items but still the method called 'getMenuItemsWithChilds' is unknown. So it won't work anyway.