which looks like a core issue of EntityFieldQuery->execute()
fix similar to this commit

Comments

geek-merlin’s picture

here it is:
http://api.drupal.org/api/drupal/includes--entity.inc/function/EntityFie...

  if (isset($this->entityConditions['bundle'])) {
    $this->addCondition($select_query, $sql_field, $this->entityConditions['bundle'], $having);
  }

geek-merlin’s picture

Status: Active » Postponed

Workaround committed.

friedjoff’s picture

Status: Postponed » Needs review
StatusFileSize
new447 bytes

For anonymous users and empty nodetype_acces permissions I get the following error message (I'm using PostgreSQL 8.4):

PDOException: SQLSTATE[42804]: Datatype mismatch: 7 ERROR: argument of AND must be type boolean, not type integer LINE 6: WHERE (promote = '1') AND (status = '1') AND (0) ) subquery ^: SELECT COUNT(*) AS expression FROM (SELECT 1 AS expression FROM {node} n WHERE (promote = :db_condition_placeholder_0) AND (status = :db_condition_placeholder_1) AND (0) ) subquery; Array ( [:db_condition_placeholder_0] => 1 [:db_condition_placeholder_1] => 1 ) in PagerDefault->execute() (line 74 of .../drupal/includes/pager.inc).

Fixed by the attached patch. Maybe I'm missing something, but I don't see the value of the removed where condition.

geek-merlin’s picture

Status: Needs review » Fixed

hi friedjoff,

yours is in fact a different issue (not efq) which schould be already fixed.

also this issue is fixed so closing.

feel free to open a new issue if necessary.

ps: if you're at drupalcon feel free to contact me, you'll find a foto on my public xing profile.

friedjoff’s picture

Hi,

sorry for hijacking this issue, I've created a new one: #1750392: PDOException for anonymous users and empty nodetype_acces permissions

PS: Unfortunately I'm not at DrupalCon, but maybe we can meet up in Freiburg one day.

Status: Fixed » Closed (fixed)

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