Hello YesCT,
I've been following your posts thoroughly here and the links provided for drupal.org posts. I'm facing some problem in automating the steps for adding "Group Subscription" feature to newly created product. Here is what i'm trying to execute as the custom php code:
module_load_include('inc', 'node', 'node.pages');
module_load_include('inc', 'uc_attribute', 'uc_attribute.admin');
module_load_include('inc', 'uc_og_subscribe', 'uc_og_subscribe.ca.inc');
$form_state = array();
$form_state['values']['uc_group_model'] = $node->model;
$form_state['values']['uc_group_gid'] = $node->nid;
$form_state['values']['uc_group_description'] = 'no description';
$form_state['values']['uc_group_active'] = '1';
$form_state['values']['uc_group_admin'] = '1';
$form_state['values']['uc_group_retro_add'] = '1';
$form_state['values']['op'] = t('Save feature');
$myemptyfeature=array();
$productnode=node_load($node->nid);
drupal_execute('uc_og_subscribe_feature_form', $form_state, $node, $myemptyfeature);
I'm not able to understand where am i going wrong. The code part that you contributed for help here: http://drupal.org/node/745794#comment-2744604 included setting up of options and attributes as well, so i left that part and took the part associated with assigning the "Group Subscription" feature. I also applied the patch that you contributed, but still i'm getting the error: "An illegal choice has been detected. Please contact the site administrator."
Can you please help me out on this.
Thanks & Regards
Sandeep Keswani
