Jump to:
| Project: | Drupal Commons |
| Version: | 7.x-3.0-beta1 |
| Component: | Groups |
| Category: | bug report |
| Priority: | critical |
| Assigned: | Unassigned |
| Status: | closed (duplicate) |
Issue Summary
When trying to create an event a warning box immediately appears at the top of the page that says:
"Warning: invalid argument supplied for foreach() in entityreference_field_widget_form() (line 185 of /.../profiles/commons/modules/contrib/entityreference/entityreference.module).
If I begin filling out the form everything is ok until I get to the Groups field. Entering anything in this field causes an AJAX http error to appear.
It is really long error, but here is the gist of it:
"An AJAX HTTP error occurred. HTTP result code: 500. Debugging information follows.
Path: http://.../entityreference/autocomplete/tags/og_group_ref/node/event/NULL
StatusText: Service unavailable (with message)
Responsetext: 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 '= 'k' AND (field_data_group_group0.entity_type = 'og_membership'
LIMIT 10 OFF' at line 2: SELECT field_data_group_group0.entity_type AS entity_type, field_data_group_group0.entity_id AS entity_id, field_data_group_group0.revision_id AS revision_id, field_data_group_group0.bundle AS bundle
FROM
{field_data_group_group} field_data_group_group0
INNER JOIN {og_membership} og_membership ON og_membership.id = field_data_group_group0.entity_id
WHERE (field_data_group_group0.group_group_value = :db_condition_placeholder_0) AND (field_data_group_group0.deleted = :db_condition_placeholder_1) AND (og_membership. = :db_condition_placeholder_2) AND (field_data_group_group0.entity_type = :db_condition_placeholder_3)
LIMIT 10 OFFSET 0; Array
(
[:db_condition_placeholder_0] => 1
[:db_condition_placeholder_1] => 0
[:db_condition_placeholder_2] => k
[:db_condition_placeholder_3] => og_membership
)
in field_sql_storage_field_storage_query() (line 582 of /.../public_html/modules/field/modules/field_sql_storage/field_sql_storage.module)."
After this error, the autocomplete fails to work.
Closing the javascript error messages and saving the event brings up an error page that restates the SQL error from the previous page.
I found the following error in the manage fields section of the admin screen for the Groups field of Events.
"Error: The selected "Target type" OG membership does not have bundles that are a group type "
| Attachment | Size |
|---|---|
| Entity Reference Module Error on Event Creation Page | 36.76 KB |
| Autocomplete AJAX pop-up alert error message when entering text in the "Group" field | 141.47 KB |
| Last error page | 90.01 KB |
Comments
#1
#2
I see this same error when attempting to create a post.
#3
Thanks for the bug report. Since this is related to the OG Group Ref field and not specific to Events, it appears to be a duplicate of #1818180: Refactor og_group_ref field definition .
#4
I didn't realize the other report.
Thanks.