I am using a slightly modified version of the example view "list users by role" given in advanced help (see: .../help/views/example-users-by-role). Since some time, the summary entry for "No role" returns a blank page.

Testing back by reloading old versions of the views module, I discovered that it worked as expected with version 6.x-2.8 but failed after 6.x-2.9.

Using preview, I see that the SQL code generated is:

for version 6.x-2.8:

SELECT users.uid AS uid,
   users.name AS users_name,
   users.created AS users_created,
   users.access AS users_access
 FROM shared_users users 
 LEFT JOIN shared_users_roles users_roles ON users.uid = users_roles.uid
 WHERE (users.uid not in ('0')) AND (users_roles.rid IS NULL)
   ORDER BY users_access DESC

and for version 6.x-2.11:

SELECT users.uid AS uid,
   users.name AS users_name,
   users.created AS users_created,
   users.access AS users_access
 FROM shared_users users 
 INNER JOIN shared_users_roles users_roles ON users.uid = users_roles.uid
 WHERE (users.uid not in ('0')) AND (users_roles.rid = 0)
   ORDER BY users_access DESC

This latter code obviously returns no rows as there is no role with rid=0.

I would be very glad to retrieve the proper functionality and I thank in advance those who will take the time to look at it.

In complement, here is the export of the view (6.x-2.11)

<?php
$view = new view;
$view->name = 'liste_utilisateurs';
$view->description = 'Liste des utilisateurs par rôle';
$view->tag = 'utilisateurs';
$view->view_php = '';
$view->base_table = 'users';
$view->is_cacheable = FALSE;
$view->api_version = 2;
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
$handler = $view->new_display('default', 'Paramètres par défaut', 'default');
$handler->override_option('fields', array(
  'name' => array(
    'label' => 'Nom',
    'alter' => array(
      'alter_text' => 0,
      'text' => '',
      'make_link' => 0,
      'path' => '',
      'link_class' => '',
      'alt' => '',
      'prefix' => '',
      'suffix' => '',
      'target' => '',
      'help' => '',
      'trim' => 0,
      'max_length' => '',
      'word_boundary' => 1,
      'ellipsis' => 1,
      'html' => 0,
      'strip_tags' => 0,
    ),
    'empty' => '',
    'hide_empty' => 0,
    'empty_zero' => 0,
    'link_to_user' => 1,
    'overwrite_anonymous' => 0,
    'anonymous_text' => '',
    'exclude' => 0,
    'id' => 'name',
    'table' => 'users',
    'field' => 'name',
    'override' => array(
      'button' => 'Supplanter',
    ),
    'relationship' => 'none',
  ),
  'created' => array(
    'label' => 'Date de création',
    'alter' => array(
      'alter_text' => 0,
      'text' => '',
      'make_link' => 0,
      'path' => '',
      'link_class' => '',
      'alt' => '',
      'prefix' => '',
      'suffix' => '',
      'target' => '',
      'help' => '',
      'trim' => 0,
      'max_length' => '',
      'word_boundary' => 1,
      'ellipsis' => 1,
      'html' => 0,
      'strip_tags' => 0,
    ),
    'empty' => '',
    'hide_empty' => 0,
    'empty_zero' => 0,
    'date_format' => 'small',
    'custom_date_format' => '',
    'exclude' => 0,
    'id' => 'created',
    'table' => 'users',
    'field' => 'created',
    'override' => array(
      'button' => 'Supplanter',
    ),
    'relationship' => 'none',
  ),
  'access' => array(
    'label' => 'Dernier accès',
    'alter' => array(
      'alter_text' => 0,
      'text' => '',
      'make_link' => 0,
      'path' => '',
      'link_class' => '',
      'alt' => '',
      'prefix' => '',
      'suffix' => '',
      'target' => '',
      'help' => '',
      'trim' => 0,
      'max_length' => '',
      'word_boundary' => 1,
      'ellipsis' => 1,
      'html' => 0,
      'strip_tags' => 0,
    ),
    'empty' => '',
    'hide_empty' => 0,
    'empty_zero' => 0,
    'date_format' => 'small',
    'custom_date_format' => '',
    'exclude' => 0,
    'id' => 'access',
    'table' => 'users',
    'field' => 'access',
    'override' => array(
      'button' => 'Supplanter',
    ),
    'relationship' => 'none',
  ),
  'edit_node' => array(
    'label' => 'Lien d\'édition',
    'alter' => array(
      'alter_text' => 0,
      'text' => '',
      'make_link' => 0,
      'path' => '',
      'link_class' => '',
      'alt' => '',
      'prefix' => '',
      'suffix' => '',
      'target' => '',
      'help' => '',
      'trim' => 0,
      'max_length' => '',
      'word_boundary' => 1,
      'ellipsis' => 1,
      'html' => 0,
      'strip_tags' => 0,
    ),
    'empty' => '',
    'hide_empty' => 0,
    'empty_zero' => 0,
    'text' => '',
    'exclude' => 0,
    'id' => 'edit_node',
    'table' => 'users',
    'field' => 'edit_node',
    'override' => array(
      'button' => 'Supplanter',
    ),
    'relationship' => 'none',
  ),
  'delete_node' => array(
    'label' => 'Opérations',
    'alter' => array(
      'alter_text' => 0,
      'text' => '',
      'make_link' => 0,
      'path' => '',
      'link_class' => '',
      'alt' => '',
      'prefix' => '',
      'suffix' => '',
      'target' => '',
      'help' => '',
      'trim' => 0,
      'max_length' => '',
      'word_boundary' => 1,
      'ellipsis' => 1,
      'html' => 0,
      'strip_tags' => 0,
    ),
    'empty' => '',
    'hide_empty' => 0,
    'empty_zero' => 0,
    'text' => '',
    'exclude' => 0,
    'id' => 'delete_node',
    'table' => 'users',
    'field' => 'delete_node',
    'override' => array(
      'button' => 'Supplanter',
    ),
    'relationship' => 'none',
  ),
));
$handler->override_option('arguments', array(
  'rid' => array(
    'default_action' => 'summary asc',
    'style_plugin' => 'default_summary',
    'style_options' => array(
      'count' => 1,
      'override' => 0,
      'items_per_page' => '25',
    ),
    'wildcard' => 'tous',
    'wildcard_substitution' => 'Tous / Toutes',
    'title' => '',
    'breadcrumb' => '',
    'default_argument_type' => 'fixed',
    'default_argument' => '',
    'validate_type' => 'none',
    'validate_fail' => 'not found',
    'break_phrase' => 0,
    'add_table' => 0,
    'require_value' => 0,
    'reduce_duplicates' => 0,
    'id' => 'rid',
    'table' => 'users_roles',
    'field' => 'rid',
    'validate_user_argument_type' => 'uid',
    'validate_user_roles' => array(
      '2' => 0,
      '5' => 0,
      '3' => 0,
      '4' => 0,
      '6' => 0,
    ),
    'override' => array(
      'button' => 'Supplanter',
    ),
    'relationship' => 'none',
    'default_options_div_prefix' => '',
    'default_argument_fixed' => '',
    'default_argument_user' => 0,
    'validate_argument_node_type' => array(
      'forum' => 0,
      'activity' => 0,
      'autrenouvelle' => 0,
      'book' => 0,
      'famille' => 0,
      'infocomite' => 0,
      'journalmazot' => 0,
      'loisirs' => 0,
      'page' => 0,
      'site' => 0,
      'story' => 0,
    ),
    'validate_argument_node_access' => 0,
    'validate_argument_nid_type' => 'nid',
    'validate_argument_vocabulary' => array(
      '1' => 0,
      '2' => 0,
      '3' => 0,
      '4' => 0,
      '5' => 0,
      '6' => 0,
      '7' => 0,
    ),
    'validate_argument_type' => 'tid',
    'validate_argument_transform' => 0,
    'validate_user_restrict_roles' => 0,
  ),
));
$handler->override_option('filters', array(
  'uid' => array(
    'operator' => 'not in',
    'value' => array(
      '0' => 0,
    ),
    'group' => '0',
    'exposed' => FALSE,
    'expose' => array(
      'operator' => FALSE,
      'label' => '',
    ),
    'id' => 'uid',
    'table' => 'users',
    'field' => 'uid',
    'override' => array(
      'button' => 'Supplanter',
    ),
    'relationship' => 'none',
  ),
));
$handler->override_option('access', array(
  'type' => 'role',
  'role' => array(
    '3' => 3,
    '4' => 4,
  ),
));
$handler->override_option('cache', array(
  'type' => 'none',
));
$handler->override_option('items_per_page', 20);
$handler->override_option('use_pager', '1');
$handler->override_option('style_plugin', 'table');
$handler->override_option('style_options', array(
  'grouping' => '',
  'override' => 1,
  'sticky' => 0,
  'order' => 'desc',
  'columns' => array(
    'name' => 'name',
    'created' => 'created',
    'access' => 'access',
    'edit_node' => 'delete_node',
    'delete_node' => 'delete_node',
  ),
  'info' => array(
    'name' => array(
      'sortable' => 1,
      'separator' => '',
    ),
    'created' => array(
      'sortable' => 1,
      'separator' => '',
    ),
    'access' => array(
      'sortable' => 1,
      'separator' => '',
    ),
    'edit_node' => array(
      'separator' => '',
    ),
    'delete_node' => array(
      'separator' => ' | ',
    ),
  ),
  'default' => 'access',
));
$handler = $view->new_display('page', 'Page', 'page_1');
$handler->override_option('path', 'liste_utilisateurs');
$handler->override_option('menu', array(
  'type' => 'normal',
  'title' => 'Liste des utilisateurs',
  'description' => '',
  'weight' => '0',
  'name' => 'menu-membres',
));
$handler->override_option('tab_options', array(
  'type' => 'none',
  'title' => '',
  'description' => '',
  'weight' => 0,
  'name' => 'navigation',
));
?>

Comments

dawehner’s picture

Status: Active » Closed (duplicate)

This is technical a duplicate of #827300: View does not display regular authenticated users

There is a working patch.

RKessi’s picture

Sorry for the duplisate. I had not found it although I searched intensively.