Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Dealing with this issue, trying to post OG Content to Drupal using Services:
diff --git a/og.module b/og.module
index 6f28205..a3aa3be 100755
--- a/og.module
+++ b/og.module
@@ -762,6 +762,12 @@ function og_form_group_reference_validate($form, &$form_state) {
if (!empty($form_state['values'][$field_name][LANGUAGE_NONE])) {
+ // @TODO: Find out why the 'og_group_ref' field isn't getting maintained in the 'values' array by form_builder()
+ if (!empty($form_state['input'][$field_name][LANGUAGE_NONE])) {
+ $form_state['values'][$field_name] = $form_state['input'][$field_name];
+ return;
+ }
// No group selected, throw an error.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment