Migrating from v14 to v15 (WebshopItemGroup' object has no attribute 'filter_fields' )

Hi team any help on this error its happen on public shop after migrate from v14 to v15

I also install webshop, but any categories not show on website and give me this error

Main error in web.log reference this query

Traceback with variables (most recent call last):
  File "apps/erpnext/erpnext/e_commerce/api.py", line 55, in get_product_filter_data
    result = engine.query(
      query_args = {'field_filters': {}, 'attribute_filters': {}, 'item_group': 'Hardware', 'start': '-6', 'from_filters': False}
      search = None
      field_filters = {}
      attribute_filters = {}
      start = -6
      item_group = 'Hardware'
      from_filters = False
      sub_categories = []
      engine = <erpnext.e_commerce.product_data_engine.query.ProductQuery object at 0x7faff1a5c610>
  File "apps/erpnext/erpnext/e_commerce/product_data_engine/query.py", line 74, in query
    result, count = self.query_items(start=start)
      self = <erpnext.e_commerce.product_data_engine.query.ProductQuery object at 0x7faff1a5c610>
      attributes = {}
      fields = {}
      search_term = None
      start = -6
      item_group = 'Hardware'
      result = []
      discount_list = []
      website_item_groups = []
      cart_items = []
      count = 0
  File "apps/erpnext/erpnext/e_commerce/product_data_engine/query.py", line 97, in query_items
    count_items = frappe.db.get_all(
      self = <erpnext.e_commerce.product_data_engine.query.ProductQuery object at 0x7faff1a5c610>
      start = -6
  File "apps/frappe/frappe/database/database.py", line 737, in get_all
    return frappe.get_all(*args, **kwargs)
      args = ('Website Item',)
      kwargs = {'filters': [['published', '=', 1]], 'or_filters': [['Website Item', 'item_group', '=', 'Hardware'], ['Website Item Group', 'item_group', '=', 'Hardware'], ['Website Item', 'item_group', 'in', ['Hardware']]], 'limit_page_length': 184467440737095516, 'limit_start': -6, 'order_by': 'ranking desc'}
  File "apps/frappe/frappe/__init__.py", line 1940, in get_all
    return get_list(doctype, *args, **kwargs)
      doctype = 'Website Item'
      args = ()
      kwargs = {'filters': [['published', '=', 1]], 'or_filters': [['Website Item', 'item_group', '=', 'Hardware'], ['Website Item Group', 'item_group', '=', 'Hardware'], ['Website Item', 'item_group', 'in', ['Hardware']]], 'limit_page_length': 184467440737095516, 'limit_start': -6, 'order_by': 'ranking desc', 'ignore_permissions': True}
  File "apps/frappe/frappe/__init__.py", line 1912, in get_list
    return frappe.model.db_query.DatabaseQuery(doctype).execute(*args, **kwargs)
      doctype = 'Website Item'
      args = ()
      kwargs = {'filters': [['published', '=', 1]], 'or_filters': [['Website Item', 'item_group', '=', 'Hardware'], ['Website Item Group', 'item_group', '=', 'Hardware'], ['Website Item', 'item_group', 'in', ['Hardware']]], 'limit_page_length': 184467440737095516, 'limit_start': -6, 'order_by': 'ranking desc', 'ignore_permissions': True}
      frappe = <module 'frappe' from 'apps/frappe/frappe/__init__.py'>
  File "apps/frappe/frappe/model/db_query.py", line 195, in execute
    result = self.build_and_run()
      self = <frappe.model.db_query.DatabaseQuery object at 0x7faff18c9e70>
      fields = None
      filters = [['published', '=', 1]]
      or_filters = [['Website Item', 'item_group', '=', 'Hardware'], ['Website Item Group', 'item_group', '=', 'Hardware'], ['Website Item', 'item_group', 'in', ['Hardware']]]
      docstatus = None
      group_by = None
      order_by = 'ranking desc'
      limit_start = -6
      limit_page_length = 184467440737095516
      as_list = False
      with_childnames = False
      debug = False
      ignore_permissions = True
      user = None
      with_comment_count = False
      join = 'left join'
      distinct = False
      start = None
      page_length = None
      limit = None
      ignore_ifnull = False
      save_user_settings = False
      save_user_settings_fields = False
      update = None
      add_total_row = None
      user_settings = None
      reference_doctype = None
      run = True
      strict = True
      ignore_ddl = False
      parent_doctype = None
      pluck = None
  File "apps/frappe/frappe/model/db_query.py", line 235, in build_and_run
    return frappe.db.sql(
      self = <frappe.model.db_query.DatabaseQuery object at 0x7faff18c9e70>
      args = {'tables': "`tabWebsite Item` left join `tabWebsite Item Group` on (`tabWebsite Item Group`.parenttype = 'Website Item' and `tabWebsite Item Group`.parent = `tabWebsite Item`.name)", 'conditions': "where `tabWebsite Item`.`published` = 1.0 and (`tabWebsite Item`.`item_group` = 'Hardware' or `tabWebsite Item Group`.`item_group` = 'Hardware' or `tabWebsite Item`.`item_group` in ('Hardware'))", 'fields': '`tabWebsite Item`.`name`', 'order_by': ' order by ranking desc', 'group_by': '', 'limit': 'limit 184467440737095520 offset -6'}
      query = "select `tabWebsite Item`.`name`\n\t\t\tfrom `tabWebsite Item` left join `tabWebsite Item Group` on (`tabWebsite Item Group`.parenttype = 'Website Item' and `tabWebsite Item Group`.parent = `tabWebsite Item`.name)\n\t\t\twhere `tabWebsite Item`.`published` = 1.0 and (`tabWebsite Item`.`item_group` = 'Hardware' or `tabWebsite Item Group`.`item_group` = 'Hardware' or `tabWebsite Item`.`item_group` in ('Hardware'))\n\t\t\t\n\t\t\t order by ranking desc\n\t\t\tlimit 184467440737095520 offset -6"
  File "apps/frappe/frappe/database/database.py", line 220, in sql
    self._cursor.execute(query, values)
      self = <frappe.database.mariadb.database.MariaDBDatabase object at 0x7faff1a5ea40>
      query = "select `tabWebsite Item`.`name`\n\t\t\tfrom `tabWebsite Item` left join `tabWebsite Item Group` on (`tabWebsite Item Group`.parenttype = 'Website Item' and `tabWebsite Item Group`.parent = `tabWebsite Item`.name)\n\t\t\twhere `tabWebsite Item`.`published` = 1.0 and (`tabWebsite Item`.`item_group` = 'Hardware' or `tabWebsite Item Group`.`item_group` = 'Hardware' or `tabWebsite Item`.`item_group` in ('Hardware'))\n\t\t\t\n\t\t\t order by ranking desc\n\t\t\tlimit 184467440737095520 offset -6"
      values = None
      as_dict = True
      as_list = 0
      formatted = 0
      debug = False
      ignore_ddl = False
      as_utf8 = 0
      auto_commit = 0
      update = None
      explain = False
      run = True
      pluck = False
  File "env/lib/python3.10/site-packages/pymysql/cursors.py", line 158, in execute
    result = self._query(query)
      self = <pymysql.cursors.Cursor object at 0x7faff099d210>
      query = "select `tabWebsite Item`.`name`\n\t\t\tfrom `tabWebsite Item` left join `tabWebsite Item Group` on (`tabWebsite Item Group`.parenttype = 'Website Item' and `tabWebsite Item Group`.parent = `tabWebsite Item`.name)\n\t\t\twhere `tabWebsite Item`.`published` = 1.0 and (`tabWebsite Item`.`item_group` = 'Hardware' or `tabWebsite Item Group`.`item_group` = 'Hardware' or `tabWebsite Item`.`item_group` in ('Hardware'))\n\t\t\t\n\t\t\t order by ranking desc\n\t\t\tlimit 184467440737095520 offset -6"
      args = None
  File "env/lib/python3.10/site-packages/pymysql/cursors.py", line 325, in _query
    conn.query(q)
      self = <pymysql.cursors.Cursor object at 0x7faff099d210>
      q = "select `tabWebsite Item`.`name`\n\t\t\tfrom `tabWebsite Item` left join `tabWebsite Item Group` on (`tabWebsite Item Group`.parenttype = 'Website Item' and `tabWebsite Item Group`.parent = `tabWebsite Item`.name)\n\t\t\twhere `tabWebsite Item`.`published` = 1.0 and (`tabWebsite Item`.`item_group` = 'Hardware' or `tabWebsite Item Group`.`item_group` = 'Hardware' or `tabWebsite Item`.`item_group` in ('Hardware'))\n\t\t\t\n\t\t\t order by ranking desc\n\t\t\tlimit 184467440737095520 offset -6"
      conn = <pymysql.connections.Connection object at 0x7faff099e650>
  File "env/lib/python3.10/site-packages/pymysql/connections.py", line 549, in query
    self._affected_rows = self._read_query_result(unbuffered=unbuffered)
      self = <pymysql.connections.Connection object at 0x7faff099e650>
      sql = b"select `tabWebsite Item`.`name`\n\t\t\tfrom `tabWebsite Item` left join `tabWebsite Item Group` on (`tabWebsite Item Group`.parenttype = 'Website Item' and `tabWebsite Item Group`.parent = `tabWebsite Item`.name)\n\t\t\twhere `tabWebsite Item`.`published` = 1.0 and (`tabWebsite Item`.`item_group` = 'Hardware' or `tabWebsite Item Group`.`item_group` = 'Hardware' or `tabWebsite Item`.`item_group` in ('Hardware'))\n\t\t\t\n\t\t\t order by ranking desc\n\t\t\tlimit 184467440737095520 offset -6"
      unbuffered = False
  File "env/lib/python3.10/site-packages/pymysql/connections.py", line 779, in _read_query_result
    result.read()
      self = <pymysql.connections.Connection object at 0x7faff099e650>
      unbuffered = False
      result = <pymysql.connections.MySQLResult object at 0x7faff18c2680>
  File "env/lib/python3.10/site-packages/pymysql/connections.py", line 1157, in read
    first_packet = self.connection._read_packet()
      self = <pymysql.connections.MySQLResult object at 0x7faff18c2680>
  File "env/lib/python3.10/site-packages/pymysql/connections.py", line 729, in _read_packet
    packet.raise_for_error()
      self = <pymysql.connections.Connection object at 0x7faff099e650>
      packet_type = <class 'pymysql.protocol.MysqlPacket'>
      buff = bytearray(b"\xff(\x04#42000You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near \'-6\' at line 6")
      packet_header = b'\x9f\x00\x00\x01'
      btrl = 159
      btrh = 0
      packet_number = 1
      bytes_to_read = 159
      recv_data = b"\xff(\x04#42000You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '-6' at line 6"
      packet = <pymysql.protocol.MysqlPacket object at 0x7faff18c8100>
  File "env/lib/python3.10/site-packages/pymysql/protocol.py", line 221, in raise_for_error
    err.raise_mysql_exception(self._data)
      self = <pymysql.protocol.MysqlPacket object at 0x7faff18c8100>
      errno = 1064
  File "env/lib/python3.10/site-packages/pymysql/err.py", line 143, in raise_mysql_exception
    raise errorclass(errno, errval)
      data = b"\xff(\x04#42000You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '-6' at line 6"
      errno = 1064
      errval = "You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '-6' at line 6"
      errorclass = <class 'pymysql.err.ProgrammingError'>
pymysql.err.ProgrammingError: (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '-6' at line 6")

Any help will be appreciate

Regards

Traceback (most recent call last):
  File "apps/frappe/frappe/website/serve.py", line 18, in get_response
    response = renderer_instance.render()
  File "apps/frappe/frappe/website/page_renderers/document_page.py", line 43, in render
    html = self.get_html()
  File "apps/frappe/frappe/website/utils.py", line 524, in cache_html_decorator
    html = func(*args, **kwargs)
  File "apps/frappe/frappe/website/page_renderers/document_page.py", line 52, in get_html
    self.update_context()
  File "apps/frappe/frappe/website/page_renderers/document_page.py", line 67, in update_context
    ret = self.doc.get_context(self.context)
  File "apps/webshop/webshop/webshop/doctype/override_doctype/item_group.py", line 59, in get_context
    context.field_filters = filter_engine.get_field_filters()
  File "apps/webshop/webshop/webshop/product_data_engine/filters.py", line 23, in get_field_filters
    filter_fields = [row.fieldname for row in self.doc.filter_fields]  # fields in settings
AttributeError: 'WebshopItemGroup' object has no attribute 'filter_fields'

@Mauriel_Rosero , Did you ever resolve this error? I just upgraded from 14 to 15 also, installing the webshop module. But I get this error anytime to go the products page.

hi not yet im still has the problem no WebshopItemGroup doctype and don’t know how to solve it recently I to a fresh install and install backup from my v15 same error

regards

there is another post of this maybe you can write there also

ok I resolve the problem uninstalling the app and then reinstalling

bench --site {site} uninstall-app {app} --no-backup

bench get-app webshop
bench --site sitename install-app webshop

That worked for me as well, thanks. Probably some issue with the old doctypes from v14. Unistalling removes them all.