I created a view for product variations with contextual filters and got an error saying that $this->product is not type of EntityInterface. This is because only the variation ID is given.
In #3029969: "Product variation: Operations links" causes a crash in ProductVariationListBuilder the last comment of Chi (#14) says it all:
This doesn't solve the problem when a view has contextual filter. Because in that case the value of $this->product would be just a product ID not a fully loaded Product entity. I think it should check if the product is instance of ProductInterface. [...]
The MR is doing exactly this.
| Comment | File | Size | Author |
|---|
Issue fork commerce-3345678
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
- 3345678-product-variation-contextual
changes, plain diff MR !143
Comments
Comment #2
juliaschwarz commentedComment #3
juliaschwarz commentedComment #4
juliaschwarz commentedComment #6
juliaschwarz commentedHide wrong patches.
Sorry I wasn't yet aware of the merge possibility.
Comment #8
jsacksick commentedCommitted the patch, thanks!!