I created a view to replace the default view of the members page of the "Group" module. When I am a site administrator the mass operation works.
When I am an authenticated user (No administrator of the site) and I select members to block them with mass operation, members are still active and the following error appears in the log (see screenshot).
When I disable my view and use the module's default view. Everything works fine.
Here is the export of my view :
$view = new view();
$view->name = 'group_members';
$view->description = '';
$view->tag = 'default';
$view->base_table = 'group_membership';
$view->human_name = 'Membres';
$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['title'] = 'Liste des membres';
$handler->display->display_options['use_more_always'] = FALSE;
$handler->display->display_options['use_more_text'] = 'plus';
$handler->display->display_options['access']['type'] = 'role';
$handler->display->display_options['access']['role'] = array(
3 => '3',
9 => '9',
);
$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['exposed_form']['options']['submit_button'] = 'Appliquer';
$handler->display->display_options['exposed_form']['options']['reset_button_label'] = 'Réinitialiser';
$handler->display->display_options['exposed_form']['options']['exposed_sorts_label'] = 'Trier par';
$handler->display->display_options['pager']['type'] = 'none';
$handler->display->display_options['style_plugin'] = 'table';
/* Entête: Global : Texte non filtré */
$handler->display->display_options['header']['area_text_custom']['id'] = 'area_text_custom';
$handler->display->display_options['header']['area_text_custom']['table'] = 'views';
$handler->display->display_options['header']['area_text_custom']['field'] = 'area_text_custom';
$handler->display->display_options['header']['area_text_custom']['empty'] = TRUE;
$handler->display->display_options['header']['area_text_custom']['content'] = '<strong>Légende :</strong></br>
Actif = fait partie du groupe et a accès aux offres groupées.</br>
Bloqué = fait partie du groupe mais n\'a plus accès aux offres groupées.</br>
Invité = a été invité dans le groupe mais n\'a pas encore accepté l\'invitation.';
/* Pied de page: Global : Texte non filtré */
$handler->display->display_options['footer']['area_text_custom']['id'] = 'area_text_custom';
$handler->display->display_options['footer']['area_text_custom']['table'] = 'views';
$handler->display->display_options['footer']['area_text_custom']['field'] = 'area_text_custom';
$handler->display->display_options['footer']['area_text_custom']['empty'] = TRUE;
$handler->display->display_options['footer']['area_text_custom']['content'] = '<strong>Instructions :</strong></br>
<u>Pour démarrer une commande groupée :</u></br>
Étape 1 : mettre à jour la liste des membres.</br>
Étape 2 : aller sur la page du groupe et cliquer sur "Démarrer la vente".</br>
Étape 3 : compléter les dates et confirmer "Démarrer la vente".</br>
<u>Pour arrêter une commande groupée :</u></br>
Étape 1 : aller sur la page du groupe et cliquer sur "Arrêter la vente".</br>
Étape 2 : confirmer "Arrêter la vente".</br>
</br>
<i>Pour plus de détails, veuillez consulter la question suivante :</br>
lien</i>';
/* Comportement en l'absence de résultats: Global : Zone de texte */
$handler->display->display_options['empty']['area']['id'] = 'area';
$handler->display->display_options['empty']['area']['table'] = 'views';
$handler->display->display_options['empty']['area']['field'] = 'area';
$handler->display->display_options['empty']['area']['empty'] = TRUE;
$handler->display->display_options['empty']['area']['content'] = 'Vous n\'avez aucun membre dans votre groupe.';
$handler->display->display_options['empty']['area']['format'] = 'plain_text';
/* Relation: Adhésion au groupe : Groupe gid */
$handler->display->display_options['relationships']['group']['id'] = 'group';
$handler->display->display_options['relationships']['group']['table'] = 'group_membership';
$handler->display->display_options['relationships']['group']['field'] = 'group';
/* Relation: Adhésion au groupe : Utilisateur uid */
$handler->display->display_options['relationships']['user']['id'] = 'user';
$handler->display->display_options['relationships']['user']['table'] = 'group_membership';
$handler->display->display_options['relationships']['user']['field'] = 'user';
/* Champ: Opérations en masse : Adhésion au groupe */
$handler->display->display_options['fields']['views_bulk_operations_1']['id'] = 'views_bulk_operations_1';
$handler->display->display_options['fields']['views_bulk_operations_1']['table'] = 'group_membership';
$handler->display->display_options['fields']['views_bulk_operations_1']['field'] = 'views_bulk_operations';
$handler->display->display_options['fields']['views_bulk_operations_1']['label'] = '';
$handler->display->display_options['fields']['views_bulk_operations_1']['element_label_colon'] = FALSE;
$handler->display->display_options['fields']['views_bulk_operations_1']['vbo_settings']['display_type'] = '0';
$handler->display->display_options['fields']['views_bulk_operations_1']['vbo_settings']['enable_select_all_pages'] = 1;
$handler->display->display_options['fields']['views_bulk_operations_1']['vbo_settings']['row_clickable'] = 1;
$handler->display->display_options['fields']['views_bulk_operations_1']['vbo_settings']['force_single'] = 0;
$handler->display->display_options['fields']['views_bulk_operations_1']['vbo_settings']['entity_load_capacity'] = '10';
$handler->display->display_options['fields']['views_bulk_operations_1']['vbo_operations'] = array(
'rules_component::rules_block_a_group_membership' => array(
'selected' => 1,
'postpone_processing' => 0,
'skip_confirmation' => 1,
'override_label' => 1,
'label' => 'Bloquer les membres sélectionnés',
),
'rules_component::rules_unblock_a_group_membership' => array(
'selected' => 1,
'postpone_processing' => 0,
'skip_confirmation' => 1,
'override_label' => 1,
'label' => 'Débloquer les membres sélectionnés',
),
);
/* Champ: Groupe : ID du groupe */
$handler->display->display_options['fields']['gid']['id'] = 'gid';
$handler->display->display_options['fields']['gid']['table'] = 'groups';
$handler->display->display_options['fields']['gid']['field'] = 'gid';
$handler->display->display_options['fields']['gid']['relationship'] = 'group';
$handler->display->display_options['fields']['gid']['exclude'] = TRUE;
/* Champ: Utilisateur : Uid */
$handler->display->display_options['fields']['uid']['id'] = 'uid';
$handler->display->display_options['fields']['uid']['table'] = 'users';
$handler->display->display_options['fields']['uid']['field'] = 'uid';
$handler->display->display_options['fields']['uid']['relationship'] = 'user';
$handler->display->display_options['fields']['uid']['exclude'] = TRUE;
/* Champ: Utilisateur : Nom */
$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']['relationship'] = 'user';
$handler->display->display_options['fields']['name']['label'] = 'Nom d\'utilisateur';
$handler->display->display_options['fields']['name']['exclude'] = TRUE;
/* Champ: Global : Texte personnalisé */
$handler->display->display_options['fields']['nothing_3']['id'] = 'nothing_3';
$handler->display->display_options['fields']['nothing_3']['table'] = 'views';
$handler->display->display_options['fields']['nothing_3']['field'] = 'nothing';
$handler->display->display_options['fields']['nothing_3']['label'] = 'Nom d\'utilisateur';
$handler->display->display_options['fields']['nothing_3']['alter']['text'] = '[name]';
$handler->display->display_options['fields']['nothing_3']['alter']['make_link'] = TRUE;
$handler->display->display_options['fields']['nothing_3']['alter']['path'] = 'group/[gid]/member/[uid]';
/* Champ: Utilisateur : Courriel */
$handler->display->display_options['fields']['mail']['id'] = 'mail';
$handler->display->display_options['fields']['mail']['table'] = 'users';
$handler->display->display_options['fields']['mail']['field'] = 'mail';
$handler->display->display_options['fields']['mail']['relationship'] = 'user';
$handler->display->display_options['fields']['mail']['link_to_user'] = '0';
/* Champ: Adhésion au groupe : Statut de membre */
$handler->display->display_options['fields']['status']['id'] = 'status';
$handler->display->display_options['fields']['status']['table'] = 'group_membership';
$handler->display->display_options['fields']['status']['field'] = 'status';
$handler->display->display_options['fields']['status']['label'] = 'Statut';
/* Champ: Adhésion au groupe : Group role */
$handler->display->display_options['fields']['role']['id'] = 'role';
$handler->display->display_options['fields']['role']['table'] = 'group_membership';
$handler->display->display_options['fields']['role']['field'] = 'role';
$handler->display->display_options['fields']['role']['label'] = 'Rôles';
$handler->display->display_options['fields']['role']['separator'] = '';
/* Champ: Global : Texte personnalisé */
$handler->display->display_options['fields']['nothing_2']['id'] = 'nothing_2';
$handler->display->display_options['fields']['nothing_2']['table'] = 'views';
$handler->display->display_options['fields']['nothing_2']['field'] = 'nothing';
$handler->display->display_options['fields']['nothing_2']['label'] = 'Metadata';
$handler->display->display_options['fields']['nothing_2']['exclude'] = TRUE;
$handler->display->display_options['fields']['nothing_2']['alter']['text'] = 'metadata';
$handler->display->display_options['fields']['nothing_2']['alter']['make_link'] = TRUE;
$handler->display->display_options['fields']['nothing_2']['alter']['path'] = 'group/[gid]/member/[uid]/metadata';
/* Champ: Global : Texte personnalisé */
$handler->display->display_options['fields']['nothing']['id'] = 'nothing';
$handler->display->display_options['fields']['nothing']['table'] = 'views';
$handler->display->display_options['fields']['nothing']['field'] = 'nothing';
$handler->display->display_options['fields']['nothing']['label'] = 'Modifier';
$handler->display->display_options['fields']['nothing']['exclude'] = TRUE;
$handler->display->display_options['fields']['nothing']['alter']['text'] = 'modifier';
$handler->display->display_options['fields']['nothing']['alter']['make_link'] = TRUE;
$handler->display->display_options['fields']['nothing']['alter']['path'] = 'group/[gid]/member/[uid]/edit?destination=group/[gid]/member';
/* Champ: Global : Texte personnalisé */
$handler->display->display_options['fields']['nothing_1']['id'] = 'nothing_1';
$handler->display->display_options['fields']['nothing_1']['table'] = 'views';
$handler->display->display_options['fields']['nothing_1']['field'] = 'nothing';
$handler->display->display_options['fields']['nothing_1']['label'] = 'Supprimer';
$handler->display->display_options['fields']['nothing_1']['exclude'] = TRUE;
$handler->display->display_options['fields']['nothing_1']['alter']['text'] = 'supprimer';
$handler->display->display_options['fields']['nothing_1']['alter']['make_link'] = TRUE;
$handler->display->display_options['fields']['nothing_1']['alter']['path'] = 'group/[gid]/member/[uid]/cancel?destination=group/[gid]/member';
/* Champ: Global : Texte personnalisé */
$handler->display->display_options['fields']['nothing_4']['id'] = 'nothing_4';
$handler->display->display_options['fields']['nothing_4']['table'] = 'views';
$handler->display->display_options['fields']['nothing_4']['field'] = 'nothing';
$handler->display->display_options['fields']['nothing_4']['label'] = 'Actions';
$handler->display->display_options['fields']['nothing_4']['alter']['text'] = '[nothing_2] [nothing] [nothing_1]';
/* Filtre contextuel: Adhésion au groupe : Groupe gid */
$handler->display->display_options['arguments']['group']['id'] = 'group';
$handler->display->display_options['arguments']['group']['table'] = 'group_membership';
$handler->display->display_options['arguments']['group']['field'] = 'group';
$handler->display->display_options['arguments']['group']['default_action'] = 'default';
$handler->display->display_options['arguments']['group']['exception']['title'] = 'Tout';
$handler->display->display_options['arguments']['group']['default_argument_type'] = 'raw';
$handler->display->display_options['arguments']['group']['default_argument_options']['index'] = '1';
$handler->display->display_options['arguments']['group']['summary']['number_of_records'] = '0';
$handler->display->display_options['arguments']['group']['summary']['format'] = 'default_summary';
$handler->display->display_options['arguments']['group']['summary_options']['items_per_page'] = '25';
/* Critère de filtrage: Adhésion au groupe : Statut de membre */
$handler->display->display_options['filters']['status']['id'] = 'status';
$handler->display->display_options['filters']['status']['table'] = 'group_membership';
$handler->display->display_options['filters']['status']['field'] = 'status';
$handler->display->display_options['filters']['status']['value'] = array(
'active' => 'active',
'blocked' => 'blocked',
'invited' => 'invited',
);
$handler->display->display_options['filters']['status']['exposed'] = TRUE;
$handler->display->display_options['filters']['status']['expose']['operator_id'] = 'status_op';
$handler->display->display_options['filters']['status']['expose']['label'] = 'Filtrer les membres';
$handler->display->display_options['filters']['status']['expose']['operator'] = 'status_op';
$handler->display->display_options['filters']['status']['expose']['identifier'] = 'status';
$handler->display->display_options['filters']['status']['expose']['remember_roles'] = array(
2 => '2',
1 => 0,
5 => 0,
8 => 0,
4 => 0,
9 => 0,
7 => 0,
3 => 0,
);
$handler->display->display_options['filters']['status']['expose']['reduce'] = TRUE;
/* Display: Page */
$handler = $view->new_display('page', 'Page', 'page');
$handler->display->display_options['path'] = 'group/%/member';
$handler->display->display_options['menu']['type'] = 'tab';
$handler->display->display_options['menu']['title'] = 'Membres';
$handler->display->display_options['menu']['weight'] = '0';
$handler->display->display_options['menu']['context'] = 0;
$handler->display->display_options['menu']['context_only_inline'] = 0;
$handler->display->display_options['tab_options']['weight'] = '0';
$translatables['group_members'] = array(
t('Master'),
t('Liste des membres'),
t('plus'),
t('Appliquer'),
t('Réinitialiser'),
t('Trier par'),
t('Asc'),
t('Desc'),
t('<strong>Légende :</strong></br>
Actif = fait partie du groupe et a accès aux offres groupées.</br>
Bloqué = fait partie du groupe mais n\'a plus accès aux offres groupées.</br>
Invité = a été invité dans le groupe mais n\'a pas encore accepté l\'invitation.'),
t('<strong>Instructions :</strong></br>
<u>Pour démarrer une commande groupée :</u></br>
Étape 1 : mettre à jour la liste des membres.</br>
Étape 2 : aller sur la page du groupe et cliquer sur "Démarrer la vente".</br>
Étape 3 : compléter les dates et confirmer "Démarrer la vente".</br>
<u>Pour arrêter une commande groupée :</u></br>
Étape 1 : aller sur la page du groupe et cliquer sur "Arrêter la vente".</br>
Étape 2 : confirmer "Arrêter la vente".</br>
</br>
<i>Pour plus de détails, veuillez consulter la question suivante :</br>
lien</i>'),
t('Vous n\'avez aucun membre dans votre groupe.'),
t('Groupe'),
t('Utilisateur'),
t('- Choisir une opération -'),
t('Bloquer les membres sélectionnés'),
t('Débloquer les membres sélectionnés'),
t('ID du groupe'),
t('.'),
t(','),
t('Uid'),
t('Nom d\'utilisateur'),
t('[name]'),
t('Courriel'),
t('Statut'),
t('Rôles'),
t('Metadata'),
t('metadata'),
t('Modifier'),
t('modifier'),
t('Supprimer'),
t('supprimer'),
t('Actions'),
t('[nothing_2] [nothing] [nothing_1]'),
t('Tout'),
t('Filtrer les membres'),
t('Page'),
);
Here is the Rules debug log :