Website Search is not working ERPNext: v14.2.2 (version-14)

Hi, Everyone,

Installed Apps
ERPNext: v14.2.2 (version-14)
Frappe Framework: v14.10.0 (version-14)
Payments: v0.0.1 (develop)

Traceback (most recent call last):
File “apps/frappe/frappe/website/”, line 18, in get_response
response = renderer_instance.render()
File “apps/frappe/frappe/website/page_renderers/”, line 78, in render
html = self.get_html()
File “apps/frappe/frappe/website/”, line 510, in cache_html_decorator
html = func(*args, **kwargs)
File “apps/frappe/frappe/website/page_renderers/”, line 89, in get_html
File “apps/frappe/frappe/website/page_renderers/”, line 157, in update_context
data = self.run_pymodule_method(“get_context”)
File “apps/frappe/frappe/website/page_renderers/”, line 219, in run_pymodule_method
return method(self.context)
File “apps/frappe/frappe/www/”, line 13, in get_context
query = str(utils.escape(sanitize_html(frappe.form_dict.q)))
AttributeError: module ‘jinja2.utils’ has no attribute ‘escape’

You shared a page but what page is that?

Website search isn’t a page, it’s just searchbar that updates as you type :thinking: like this:


Yes, if we want to search anything in search bar,
It’s shows error.

Please Note: Search Bar for website user.
Not the app search bar

Solutions not found in
ERPNext: v14.2.3 (version-14)
Frappe Framework: v14.10.0 (version-14)

Still awaiting for solutions, if anyone know about this kindly help.

Fixed: fix: correct import for markupsafe.escape by ankush · Pull Request #18399 · frappe/frappe · GitHub