2

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 and Bulk 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\""
}
]
  • To better understand the details of this question, it might help a lot if you edit your question to also include (a) an export of your view and (b) an export of your rule ... – Pierre.Vriens Nov 28 '16 at 17:08
  • Any server error log? – Jimmy Ko Nov 28 '16 at 23:17
  • Exported view and server log added. – studiocomms Nov 29 '16 at 9:08
  • If my answer doesn't help to get this sorted out (get it to work), maybe you should refine your question by adding something like "... or is there any workaround to prevent this AJAX error (and still achieve my goal as in the related question)". It wouldn't invalidate my answer, though you might get an answer with a working solution. Give it a thought! – Pierre.Vriens Nov 29 '16 at 12:00
2

Not sure if it's what's causing your issue, but it looks like your issue is similar to "AJAX error 500 reported when trying to add certain actions": the AJAX error you included in your question is idential to what is in the issue description!

Attempt 1: As per comment 4 and 5: if you have the Universally Unique IDentifier module enabled, try to (temporary) disable that module. It might help to eventually get around it

Attempt 2: Related to the error about "PHP Fatal error: Allowed memory size of 268435456 bytes exhausted ..." in your server error log: try to (temporary) increase the allowed memory, just to eliminate the possibility that it's because you don't have enough memory available.

If none of this helps, then:

  1. please try to add your feedback to this issue I mentioned (which is still in status "Maintainer needs more info").
  2. Have a look at this answer as a possible alternative, which uses another technique, and therefor possibly doesn't cause this very same AJAX error.
  • Hi Pierre, neither of those worked so we've handed this over to a server development team to investigate for the time being. Thanks for all your help. Will mark the other question as answered in the previous thread, we'll assume it would work if we could get Drupal to play ball :) – studiocomms Nov 30 '16 at 11:10
  • @studiocomms Merci for the feedback about this question (and the related one). But guess what: I'm planning to (soon, possibly still today ...) post an additional answer in the related question, for which it might well be possible (to not say pretty sure) run into this AJAX error. If I'm lucky (and it works for you, I'd beat your server dev team ...) – Pierre.Vriens Nov 30 '16 at 11:15
  • @studiocomms ... curious if the alternative in bullet "2." will help you to *get around (= avoid) this AJAX issue ... – Pierre.Vriens Nov 30 '16 at 15:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.