Change

    if ($bundles = $this->getBundles()) {
      $query->condition($this->getBundleKey(), $bundles);
    }

to

    if ($bundles = $this->getBundles()) {
      $query->condition($this->getBundleKey(), $bundles, 'IN');
    }

or it will throw
"Invalid parameter number: number of bound variables does not match number of tokens ..."

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Andreas Radloff created an issue. See original summary.

Andreas Radloff’s picture

Andreas Radloff’s picture

Status: Active » Needs review

  • MegaChriz committed 516a1e9 on 8.x-3.x
    Issue #2790105 by MegaChriz: EntityProcessorBase::onFeedDeleteMultiple...
  • MegaChriz committed 7145f66 on 8.x-3.x authored by Andreas Radloff
    Issue #2790105 by Andreas Radloff: EntityReference target findEntity()...
MegaChriz’s picture

Status: Needs review » Fixed

In D7 the database API automatically adds the "IN" keyword if the value is an array, but it appears that D8 no longer does this. This was changed in in #2358079: Require a specific placeholder format in db_query() in order to trigger argument expansion, and require explicit 'IN' parameter for conditions.

Committed #2.

Additionally, found one more query where the "IN" keywords needs to be added. Committed this change as well.

Thanks for reporting and fixing!

Status: Fixed » Closed (fixed)

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