Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comment | File | Size | Author |
---|---|---|---|
#1 | 2190107-og_node_create_links_multiple-1.patch | 3.71 KB | guillaumev |
Comments
Comment #1
guillaumev CreditAttribution: guillaumev commentedHere is the patch.
Comment #2
shushu CreditAttribution: shushu commentedThanks 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.