I just installed redhen in a minimal drupal-7.14 install:
drush dl redhen
drush en -y edhen_membership, redhen_note, redhen_contact, redhen_registration, redhen_org, redhen_org_group, redhen_engagement, redhen_fields, redhenWhen I try to go to my homepage, I get a fatal error.
PDOException: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '))' at line 1: SELECT redhen_org.org_id AS entity_id, redhen_org.type AS bundle, :entity_type AS entity_type, NULL AS revision_id FROM {redhen_org} redhen_org WHERE (redhen_org.redhen_state = :db_condition_placeholder_0) AND (redhen_org.author_uid = :db_condition_placeholder_1) AND (type IN ()) ; Array ( [:db_condition_placeholder_0] => 1 [:db_condition_placeholder_1] => 0 [:entity_type] => redhen_org ) in EntityFieldQuery->execute() (line 1136 of includes/entity.inc).
Disabling redhen_org resolved the issue.
Comments
Comment #1
seanberto commentedFor one, there is a typo in your "drush en" command.
There might an order of operations issue in the drush-based install of all these module inter-dependencies (as Drush's bootstrap for enabling modules is different from the order of operations when enabling modules via the GUI). Also, I'm not sure what versions of the non-RedHen dependencies you are using.
If you're interested in quickly spinning up a RedHen instance, I'd recommend using the make file at http://drupal.org/project/redhen_demo. Otherwise, it might take some addition playing around.
Comment #2
seanberto commentedAlso, try being a bit more explicit in the order of enabling these modules (and try via the GUI b/c the cache clearing is sometimes different than with Drush).
Try this order:
* entity, relation (the dev release), other non-RedHen dependencies.
* RedHen, RedHen Contact, RedHen Fields, RedHen Org
* RedHen Membership
* RedHen Notes and Engagement
* RedHen Registration and RedHen Org Group
Comment #3
levelos commented@jlyon, I've tried the exact command you ran, sans typo, and cannot replicate I'm afraid. My guess is it might be your version of Entity API; we're depending on at least RC3. Let us know if have any more details.
Comment #4
joel_osc commentedI am seeing this issue as well, I tried updating to latest dev of entity and the problem persists. When I disable Redhen Organization Groups module the problem goes away.
Comment #5
joel_osc commentedA little more info, it looks like this is triggered by the following lines in redhen_org_group.module, when connecting to the site as anonymous (not logged in):
199 $result = $query
200 ->entityCondition('entity_type', 'redhen_org')
201 ->entityCondition('bundle', $group_types, 'IN')
202 ->propertyCondition('redhen_state', REDHEN_STATE_ACTIVE)
203 ->propertyCondition('author_uid', $account->uid)
204 ->execute();
If $group_types is empty this query will return the above error. So either $group_types should not be empty or adding the condition on line 201 needs to be wrapped in an if ($group_types). I don't know this code that well, but I think for user anonymous $group_types being empty is a normal condition.
Comment #6
levelos commentedThanks @joel_osc. That's certainly an issue. Fix committed in 0baf43877aa51ceeae3948537f4e9b8bf74dd110. Let me know if that resolves the issue.
Comment #8
jlyon commentedSorry for not getting back to you on this. This fixed the issue for me. Thanks! Really impressive suite of modules.
Comment #9
seanberto commentedw00t!
Comment #9.0
seanberto commentedrm full path