Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Color Refinements not bucketed or with bucket type none throw error #980

Open
clavery opened this issue Feb 10, 2023 · 2 comments
Open
Labels
Acknowledged Team has responded to issue BUG P3 git2gus label for bug

Comments

@clavery
Copy link
Collaborator

clavery commented Feb 10, 2023

Summary

If a color refinement (i.e. c_refinementColor which uses the ColorRefinements component) is configured to use bucket type: None or has unbucketed values that are shown (both these situations are common, especially the latter) the ColorRefinements component will throw an error:

TypeError: Cannot read property 'toLowerCase' of undefined
    at eval (webpack-internal:///./app/pages/product-list/partials/color-refinements.jsx:63:100)
    at Array.map (<anonymous>)
    at ColorRefinements (webpack-internal:///./app/pages/product-list/partials/color-refinements.jsx:39:76)

This is because the response will NOT include a presentationId for any unbucketed values (or at all if the refinement is configured to not bucket).

Recommend falling back to the value of the refinement if presentationId is not available.

The latter case (unbucketed values) is common with merchants as often new values can arrive in the incoming catalog feeds before they are bucketed by the merchant (in fact there's a system job that alerts merchants of this but they may not get to it before it lands on production)

Steps To Reproduce

  • Configure refinementColor in BM: either a) delete one of the existing buckets (i.e. blue) or b) change the entire refinement bucket type to None (NOTE: this will remove all buckets making it harder to get them back to the original configuration; recommend exporting catalog first) or c) (not tested yet) remove the presentationId from a bucket

Screenshot 2023-02-10 at 10 34 08 AM

Expected result

The page does not error

Actual result

Exception (internal server error)

System Information (as applicable)

Browser:
Node version:
pwa-kit version: 2.5.0
Desktop OS:
Mobile Device Info:

Additional information

@vmarta vmarta added the BUG P3 git2gus label for bug label Feb 13, 2023
@git2gus
Copy link

git2gus bot commented Feb 13, 2023

This issue has been linked to a new work item: W-12538145

@vmarta
Copy link
Contributor

vmarta commented Feb 13, 2023

Thanks @clavery for reporting this bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Acknowledged Team has responded to issue BUG P3 git2gus label for bug
Projects
None yet
Development

No branches or pull requests

3 participants