The query

    $query = $this->getQuery()
      ->accessCheck(TRUE)
      ->addTag('entity_access')
      ->condition('status', TRUE)
      ->condition('variation_id', $ids, 'IN');

Will fail when there are no variations for a product and $ids is empty

I came across this when trying to create a feed in the commerce_product_feeds module

Issue fork commerce-3359599

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:

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

tim_dj created an issue. See original summary.

tim_dj’s picture

Status: Active » Needs review
tim_dj’s picture

Assigned: tim_dj » Unassigned
Issue summary: View changes

jsacksick made their first commit to this issue’s fork.

  • jsacksick committed d4265525 on 8.x-2.x authored by tim_dj
    Issue #3359599: ProductVariationStorage::loadEnabled() will fail when...
jsacksick’s picture

Status: Needs review » Fixed

  • jsacksick committed 59dd217f on 3.0.x authored by tim_dj
    Issue #3359599: ProductVariationStorage::loadEnabled() will fail when...

Status: Fixed » Closed (fixed)

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