I have a content type with 2 group audience fields. From my node create links, I need to be able to prepopulate BOTH fields, which is currently not possible with the way og_node_create_links is implemented. I will propose a patch to reimplement og_node_create_links and allow for multiple group audience fields.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

guillaumev’s picture

Status: Active » Needs review
FileSize
3.71 KB

Here is the patch.

shushu’s picture

Status: Needs review » Needs work

Thanks for the patch.
First, I reproduced the limitation you mentioned and it seems to me that there is a problem only in case both fields suppose to get the same value (at least this what happened to me). If each of them suppose to get a different value, it worked as-is.

Second, patch wise, changing the order of the functions in the code makes it harder to review. Please put the helper function after the existing function. This makes it much clearer to see what you actually did.

Third, considering it is a feature request, adding tests to verify it actually works is very important.

I will be happy to review the next patch.