Open miiichael opened 1 year ago
It seems to still work with 1.0.0 if we initializes flask-menu ourselves:
from flask_breadcrumbs import Breadcrumbs
from flask_menu import Menu
menu = Menu()
breadcrumbs = Breadcrumbs(init_menu=False)
menu.init_app(app)
breadcrumbs.init_app(app)
This is probably caused by the breadcrumbs constructor not calling super()
so that the root_node
attribute is not set:
https://github.com/inveniosoftware/flask-menu/blob/master/flask_menu/ext.py#L24
Package version (if known): 0.5.1
Describe the bug
I'm wondering if something has changed within Flask-Menu that Flask-Breadcrumbs needs to take into account.
Steps to Reproduce
Expected behavior
TypeError: The view function for 'index' did not return a valid response. The function either returned None or ended without a return statement.
Ideally there would be no error, but I think index() not returning anything is a (different) bug in the example code.Screenshots (if applicable)
Additional context
Downgrading flask-menu from 1.0.0 to 0.7.2 makes the problem go away. This leads me to believe current Flask-Breadcrumbs is incompatible with current Flask-Menu.