For some reason, I get a PDOException when the formatter view it's called. It seems allowed_node_types variable's is not set.
Notice: Undefined index: allowed_node_types a autocomplete_widgets_field_formatter_view() (line 251 .../autocomplete_widgets.module).
Warning: Invalid argument supplied for foreach() a DatabaseCondition->compile() (línia 1854 de /Users/miguel/Sites/apralia/includes/database/query.inc).
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 node.nid AS entity_id, node.vid AS revision_id, node.type AS bundle, :entity_type AS entity_type FROM {node} node WHERE (node.title = :db_condition_placeholder_0) AND (node.status = :db_condition_placeholder_1) AND (type IN ()) ; Array ( [:db_condition_placeholder_0] => APBI149 [:db_condition_placeholder_1] => 1 [:entity_type] => node ) a EntityFieldQuery->execute() (línia 1136 de /Users/miguel/Sites/apralia/includes/entity.inc).
I attached a patch checks allowed_node_types variable's before the EntityFieldQuery it's executed.
Comment | File | Size | Author |
---|---|---|---|
pdoexception_when_allowed_node_types_not_set.patch | 979 bytes | mordonez | |
Comments
Comment #1
bleen CreditAttribution: bleen commentedwhile the patch looks fine .. I cannot seem to produce a situation where this error occurs. Can you tell me how to reproduce?
Comment #2
mordonez CreditAttribution: mordonez commentedSorry I can't reproduce the error again. But it seems when I deleted the module's folder by accident I restored it again.
Comment #3
bleen CreditAttribution: bleen commentedI'm closing since we cannot reproduce ...
Comment #4
FiNeX CreditAttribution: FiNeX commentedHi, I'm experiencing this bug using latest -dev version of autocomplete_widgets module. The patch posted by mordonez works fine :-) Thanks!
Comment #5
bleen CreditAttribution: bleen commentedCommitted the patch since it seems to fix when this can be reproduced
Comment #6
FiNeX CreditAttribution: FiNeX commentedThanks bleen18 :)