We've a large site running Drupal 7 with OG, Flag, Rules, etc.
OG uses a subscription model where you have to confirm you want to join a group (or leave a group) so we've decided to move to a Flag system that then uses rules to add (or remove) that user from the group. We previously asked a question asking how to apply flags retrospectively for group subscriptions using Organic Groups - you can find this in "How to apply flags retrospectively for group subscriptions using Organic Groups?".
As per the existing answer in that question, we created a view that shows users sorted by newest first. Some more details about that view:
Fields are
User: Name
andBulk operations: User
.Filter Criteria is
User: Active
and that they are a member of a specific group.
We then go to add the Rule. When we try to add the action 'Load a list of entity ids from a VBO View' a little Please Wait
-message displays and then, after 15 seconds or so, I get an Ajax error like so:
Http Result Code: 500
Debugging Information follows:
Path: /system/ajax
Statustext: Internal Server Error
ResponseText: (this is blank/empty)
Have we done something wrong setting up the View, or could it be something wrong with the install that could be giving the error?
Here is an export of our view:
$view = new view();
$view->name = 'vbo_sandbox_2';
$view->description = '';
$view->tag = 'default';
$view->base_table = 'users';
$view->human_name = 'VBO Sandbox 2';
$view->core = 7;
$view->api_version = '3.0';
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
/* Display: Master */
$handler = $view->new_display('default', 'Master', 'default');
$handler->display->display_options['use_more_always'] = FALSE;
$handler->display->display_options['access']['type'] = 'perm';
$handler->display->display_options['access']['perm'] = 'access user profiles';
$handler->display->display_options['cache']['type'] = 'none';
$handler->display->display_options['query']['type'] = 'views_query';
$handler->display->display_options['exposed_form']['type'] = 'basic';
$handler->display->display_options['pager']['type'] = 'none';
$handler->display->display_options['pager']['options']['offset'] = '0';
$handler->display->display_options['style_plugin'] = 'default';
$handler->display->display_options['row_plugin'] = 'fields';
/* Field: Bulk operations: User */
$handler->display->display_options['fields']['views_bulk_operations']['id'] = 'views_bulk_operations';
$handler->display->display_options['fields']['views_bulk_operations']['table'] = 'users';
$handler->display->display_options['fields']['views_bulk_operations']['field'] = 'views_bulk_operations';
$handler->display->display_options['fields']['views_bulk_operations']['vbo_settings']['display_type'] = '0';
$handler->display->display_options['fields']['views_bulk_operations']['vbo_settings']['enable_select_all_pages'] = 1;
$handler->display->display_options['fields']['views_bulk_operations']['vbo_settings']['row_clickable'] = 0;
$handler->display->display_options['fields']['views_bulk_operations']['vbo_settings']['force_single'] = 0;
$handler->display->display_options['fields']['views_bulk_operations']['vbo_settings']['entity_load_capacity'] = '10';
/* Field: User: Name */
$handler->display->display_options['fields']['name']['id'] = 'name';
$handler->display->display_options['fields']['name']['table'] = 'users';
$handler->display->display_options['fields']['name']['field'] = 'name';
$handler->display->display_options['fields']['name']['label'] = '';
$handler->display->display_options['fields']['name']['alter']['word_boundary'] = FALSE;
$handler->display->display_options['fields']['name']['alter']['ellipsis'] = FALSE;
/* Filter criterion: User: Active */
$handler->display->display_options['filters']['status']['id'] = 'status';
$handler->display->display_options['filters']['status']['table'] = 'users';
$handler->display->display_options['filters']['status']['field'] = 'status';
$handler->display->display_options['filters']['status']['value'] = '1';
$handler->display->display_options['filters']['status']['group'] = 1;
$handler->display->display_options['filters']['status']['expose']['operator'] = FALSE;
/* Filter criterion: Field: Groups (field_group_collaborative) */
$handler->display->display_options['filters']['field_group_collaborative_target_id']['id'] = 'field_group_collaborative_target_id';
$handler->display->display_options['filters']['field_group_collaborative_target_id']['table'] = 'og_membership';
$handler->display->display_options['filters']['field_group_collaborative_target_id']['field'] = 'field_group_collaborative_target_id';
$handler->display->display_options['filters']['field_group_collaborative_target_id']['value']['value'] = '761';
There is no export of the rule as trying to build a rule gives a timeout AJAX error.
We've bumped up all the server/mysql/php settings.
Server error log
[
{
"disp_time": "2016-11-28 14:40:52",
"http_status": 500,
"id": 10,
"log_type": "varnish-request",
"request_id": "v-a93ea8f4-b578-11e6-988a-22000a62068c",
"server": "###",
"text": "### - - \"POST http://###.com/system/ajax HTTP/1.1\" 500 26 \"https://###.com/admin/config/workflow/rules/reaction/manage/rules_sandy/add/1/action\" \"Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.99 Safari/537.36\" 30.616768360 miss pass request_id=\"v-a93ea8f4-b578-11e6-988a-22000a62068c\" \"-\" forwarded_for=\"###\""
},
{
"disp_time": "2016-11-28 14:40:52",
"http_status": 500,
"id": 9,
"log_type": "apache-request",
"request_id": "v-a93ea8f4-b578-11e6-988a-22000a62068c",
"server": "###",
"text": "### - - \"POST /system/ajax HTTP/1.1\" 500 26 \"https://###.com/admin/config/workflow/rules/reaction/manage/rules_sandy/add/1/action\" \"Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.99 Safari/537.36\" vhost=###.com host=###.com hosting_site=### pid=2531 request_time=30614611 forwarded_for=\"###\" request_id=\"v-a93ea8f4-b578-11e6-988a-22000a62068c\""
},
{
"disp_time": "2016-11-28 14:41:22",
"http_status": 500,
"id": 8,
"log_type": "bal-request",
"request_id": "v-a93ea8f4-b578-11e6-988a-22000a62068c",
"server": "###",
"text": "127.0.0.1 - - \"POST /system/ajax HTTP/1.1\" 500 719 \"https://###.com/admin/config/workflow/rules/reaction/manage/rules_sandy/add/1/action\" \"Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.99 Safari/537.36\" http_host=###.com affinity=\"-\" upstream_addr=\"###\" hosting_site=### request_time=30.616 forwarded_for=\"###\" upstream_status=\"500\" request_id=\"v-a93ea8f4-b578-11e6-988a-22000a62068c\" ssl_protocol=\"-\" ssl_cipher=\"-\""
},
{
"disp_time": "2016-11-28 14:41:22",
"id": 7,
"log_type": "drupal-request",
"request_id": "v-a93ea8f4-b578-11e6-988a-22000a62068c",
"server": "###",
"text": " ###.com POST /system/ajax http_code=500 query= uid=11656 php_pid=7959 php_time=30.232 queue_wait=0 request_id=\"v-a93ea8f4-b578-11e6-988a-22000a62068c\""
},
{
"id": 6,
"log_type": "php-error",
"request_id": "v-a93ea8f4-b578-11e6-988a-22000a62068c",
"server": "###",
"text": " PHP Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 72 bytes) in /mnt/www/html/###/docroot/includes/database/database.inc on line 2200 request_id=\"v-a93ea8f4-b578-11e6-988a-22000a62068c\""
},
{
"disp_time": "2016-11-28 14:41:17",
"id": 5,
"log_type": "drupal-watchdog",
"request_id": "v-a93ea8f4-b578-11e6-988a-22000a62068c",
"server": "###",
"text": " ###: https://###.com|1480344077|php|###|https://###.com/system/ajax|https://###.com/admin/config/workflow/rules/reaction/manage/rules_sandy/add/1/action|11656||Notice: Undefined property: view::$exposed_input in views_plugin_display_attachment->attach_to() (line 230 of /mnt/www/html/###/docroot/sites/all/modules/contrib/views/plugins/views_plugin_display_attachment.inc). request_id=\"v-a93ea8f4-b578-11e6-988a-22000a62068c\""
},
{
"disp_time": "2016-11-28 14:41:14",
"id": 4,
"log_type": "drupal-watchdog",
"request_id": "v-a93ea8f4-b578-11e6-988a-22000a62068c",
"server": "###",
"text": " ### ###: https://###.com|1480344074|form|###|https://###.com/system/ajax|https://###.com/admin/config/workflow/rules/reaction/manage/rules_sandy/add/1/action|11656||Illegal choice all in type element. request_id=\"v-a93ea8f4-b578-11e6-988a-22000a62068c\""
},
{
"disp_time": "2016-11-28 14:41:14",
"id": 3,
"log_type": "drupal-watchdog",
"request_id": "v-a93ea8f4-b578-11e6-988a-22000a62068c",
"server": "###",
"text": " ### ###: https://###.com|1480344074|form|###|https://###.com/system/ajax|https://###.com/admin/config/workflow/rules/reaction/manage/rules_sandy/add/1/action|11656||Illegal choice all in type element. request_id=\"v-a93ea8f4-b578-11e6-988a-22000a62068c\""
},
{
"disp_time": "2016-11-28 14:41:13",
"id": 2,
"log_type": "drupal-watchdog",
"request_id": "v-a93ea8f4-b578-11e6-988a-22000a62068c",
"server": "###",
"text": " ### ###: https://###.com|1480344073|form|###|https://###.com/system/ajax|https://###.com/admin/config/workflow/rules/reaction/manage/rules_sandy/add/1/action|11656||Illegal choice all in type element. request_id=\"v-a93ea8f4-b578-11e6-988a-22000a62068c\""
},
{
"disp_time": "2016-11-28 14:41:13",
"id": 1,
"log_type": "drupal-watchdog",
"request_id": "v-a93ea8f4-b578-11e6-988a-22000a62068c",
"server": "###",
"text": " ### ###: https://###.com|1480344073|form|###|https://###.com/system/ajax|https://###.com/admin/config/workflow/rules/reaction/manage/rules_sandy/add/1/action|11656||Illegal choice all in type element. request_id=\"v-a93ea8f4-b578-11e6-988a-22000a62068c\""
}
]