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.

Issue fork commerce-3345678

Command icon 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:

Comments

juliaschwarz created an issue. See original summary.

juliaschwarz’s picture

Issue summary: View changes
Status: Active » Needs review
StatusFileSize
new1.66 KB
juliaschwarz’s picture

Issue summary: View changes
juliaschwarz’s picture

StatusFileSize
new1.54 KB

juliaschwarz’s picture

Issue summary: View changes

Hide wrong patches.
Sorry I wasn't yet aware of the merge possibility.

jsacksick’s picture

Status: Needs review » Fixed

Committed the patch, thanks!!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.