After Migrate to 16 webshop category and home page link is not working

https://www.makemylight.com/ this home is not working if we logged in.

Also to list all items in a category also not working https://www.makemylight.com/products/outdoor-lighting/spike-light

All Products all products category is working. Please help.

this error is showing. If we click on show error nothing is showing.

Are you using the version-16 branch of the webshop?

yes version 16. I feel like some field is missing from item/website item in version 16.

Traceback (most recent call last):
  File "apps/frappe/frappe/website/serve.py", line 20, in get_response
    return renderer_instance.render()
           ~~~~~~~~~~~~~~~~~~~~~~~~^^
  File "apps/frappe/frappe/website/page_renderers/document_page.py", line 41, in render
    html = self.get_html()
  File "apps/frappe/frappe/website/utils.py", line 540, in cache_html_decorator
    html = func(*args, **kwargs)
  File "apps/frappe/frappe/website/page_renderers/document_page.py", line 50, in get_html
    self.update_context()
    ~~~~~~~~~~~~~~~~~~~^^
  File "apps/frappe/frappe/website/page_renderers/document_page.py", line 65, 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 24, 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'


I am getting this error. Any Suggestions?

@Atheetha This is the same filter_fields attribute error that occurred during v14→v15 migrations as well.

Root cause: When you migrate to v16, the webshop app overrides Item Group with WebshopItemGroup. But during migration, the old DocType schema doesn’t get fully replaced — so WebshopItemGroup ends up missing the filter_fields child table that filters.py line 24 expects.

Fix that has worked for others with this exact error:

bench --site your-site uninstall-app webshop --no-backup
bench get-app webshop --branch version-16
bench --site your-site install-app webshop
bench --site your-site migrate

Uninstalling removes the stale DocTypes from the previous version, and reinstalling creates them fresh with the correct v16 schema including filter_fields.

Before doing this, take a backup of your site:

bench --site your-site backup --with-files

Reference: Same issue was reported and resolved during v14→v15 migration here: Migrating from v14 to v15 (WebshopItemGroup object has no attribute ‘filter_fields’)

Let us know if this resolves it.

If I do that will I lost all my data?