Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

Spilled icecream (js error) with Filter Products by Attribute when store has no attributes #2441

Closed
haszari opened this issue May 8, 2020 · 9 comments · Fixed by #4847
Closed
Assignees
Labels
block: filter by attribute Issues related to the Filter by Attribute block. type: bug The issue/PR concerns a confirmed bug. type: good first issue The issue is a good candidate for the first community contribution/for a newcomer to the team.

Comments

@haszari
Copy link
Member

haszari commented May 8, 2020

Screen Shot 2020-05-08 at 3.13.20 PM.png

To reproduce

  • Ensure your store has no product attributes set up.
  • Add a Filter Products by Attribute block to a page or post, publish.
  • View on front end - javascript error: TypeError: Cannot read property 'id' of undefined

We probably need some checks to render nothing / placeholder if the store has no attributes.

@nerrad nerrad added the type: bug The issue/PR concerns a confirmed bug. label May 11, 2020
@nerrad
Copy link
Contributor

nerrad commented May 11, 2020

@haszari I've moved this to the backlog for now. However, if you can't reproduce on a released version of the blocks (or WC core), then note that in the issue and I'll consider giving it a higher priority.

@haszari
Copy link
Member Author

haszari commented May 11, 2020

Confirming this is reproducible on WordPress 5.4.1 (current) with current WooCommerce and WooCommerce Blocks:

Screen Shot 2020-05-12 at 7 44 07 AM

Screen Shot 2020-05-12 at 7 44 35 AM

It's a bit of an edge case I guess.

@nerrad
Copy link
Contributor

nerrad commented May 11, 2020

It's a bit of an edge case I guess.

It's an edgecase, but would still be nice to give some feedback to merchants when they are configuring the filter block in the backend to that they have fair warning they need to setup some attributes before using the block.

With that said, since this has been out in the wild for a while now (thanks for verifying ✋) and there doesn't seem to be mention of it surfacing anywhere, I think we can leave it in the backlog and pick it up as a cooldown task at some point.

@nerrad nerrad added the block: filter by attribute Issues related to the Filter by Attribute block. label Jun 7, 2020
@github-actions
Copy link
Contributor

This issue has been marked as stale because it has not seen any activity within the past 60 days. Remove the stale label or post a comment, otherwise it will be closed in 10 days.

@github-actions github-actions bot added the status: stale Stale issues and PRs have had no updates for 60 days. label Dec 16, 2020
@nerrad nerrad removed the status: stale Stale issues and PRs have had no updates for 60 days. label Dec 16, 2020
@github-actions
Copy link
Contributor

This issue has been marked as stale because it has not seen any activity within the past 60 days. Our team uses this tool to help surface issues for review. If you are the author of the issue there's no need to comment as it will be looked at.

Internal: After 10 days with no activity this issue will be automatically be closed.

@github-actions github-actions bot added the status: stale Stale issues and PRs have had no updates for 60 days. label Feb 15, 2021
@nerrad nerrad added type: good first issue The issue is a good candidate for the first community contribution/for a newcomer to the team. and removed status: stale Stale issues and PRs have had no updates for 60 days. labels Feb 16, 2021
@github-actions
Copy link
Contributor

This issue has been marked as stale because it has not seen any activity within the past 60 days. Our team uses this tool to help surface issues for review. If you are the author of the issue there's no need to comment as it will be looked at.

Internal: After 10 days with no activity this issue will be automatically be closed.

@github-actions github-actions bot added the status: stale Stale issues and PRs have had no updates for 60 days. label Apr 19, 2021
@nerrad nerrad removed the status: stale Stale issues and PRs have had no updates for 60 days. label Apr 21, 2021
@github-actions
Copy link
Contributor

This issue has been marked as stale because it has not seen any activity within the past 60 days. Our team uses this tool to help surface issues for review. If you are the author of the issue there's no need to comment as it will be looked at.

Internal: After 10 days with no activity this issue will be automatically be closed.

@github-actions github-actions bot added the status: stale Stale issues and PRs have had no updates for 60 days. label Jun 21, 2021
@nerrad nerrad removed the status: stale Stale issues and PRs have had no updates for 60 days. label Jun 25, 2021
@github-actions
Copy link
Contributor

This issue has been marked as stale because it has not seen any activity within the past 60 days. Our team uses this tool to help surface issues for review. If you are the author of the issue there's no need to comment as it will be looked at.

Internal: After 10 days with no activity this issue will be automatically be closed.

@github-actions github-actions bot added the status: stale Stale issues and PRs have had no updates for 60 days. label Aug 25, 2021
@nerrad nerrad removed the status: stale Stale issues and PRs have had no updates for 60 days. label Aug 26, 2021
@dinhtungdu dinhtungdu self-assigned this Sep 23, 2021
@dinhtungdu
Copy link
Member

There is another error in the editor that relates to this issue: Adding Filter Products by Attribute then clicking Save without selecting any attribute causes the block to fail to preview:

Screen Shot 2021-09-26 at 21 46 31

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
block: filter by attribute Issues related to the Filter by Attribute block. type: bug The issue/PR concerns a confirmed bug. type: good first issue The issue is a good candidate for the first community contribution/for a newcomer to the team.
Projects
None yet
3 participants