I have created a Content Type Event with 3 CCK fields: begin date/time, end date/time, and description. I also created a View to display the events in a table form. Everything works fine in the Preview when I creates the View.

User A creates Record 1
User B creates Record 2
User admin creates Record 3

When User A displays the View, it shows:
Record 1
Record 1
Record 2
Record 3

When User B displays the View, it shows:
Record 1
Record 2
Record 2
Record 3

When admin displays the View, it shows:
Record 1
Record 2
Record 3

If I give User A permission to administer Views, then when User A displays the View, it shows:
Record 1
Record 2
Record 3

Comments

dawehner’s picture

Priority: Critical » Normal
Status: Active » Postponed (maintainer needs more info)

You have to provide more informations

a) export the view
b) do you have some node access modules
c) did you updated to drupal 6.16

You should never give normal users "administer views" rights.

kcpau’s picture

a) Please see below:

$view = new view;
$view->name = 'event_test';
$view->description = 'Test Event View';
$view->tag = '';
$view->view_php = '';
$view->base_table = 'node';
$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', 'Defaults', 'default');
$handler->override_option('fields', array(
  'field_events_begin_value' => array(
    'label' => 'Begin',
    '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_node' => 0,
    'label_type' => 'widget',
    'format' => 'default',
    'multiple' => array(
      'multiple_number' => '',
      'multiple_from' => '',
      'multiple_to' => '',
      'group' => TRUE,
    ),
    'repeat' => array(
      'show_repeat_rule' => '',
    ),
    'fromto' => array(
      'fromto' => 'both',
    ),
    'exclude' => 0,
    'id' => 'field_events_begin_value',
    'table' => 'node_data_field_events_begin',
    'field' => 'field_events_begin_value',
    'relationship' => 'none',
  ),
  'field_events_end_value' => array(
    'label' => 'End',
    '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_node' => 0,
    'label_type' => 'widget',
    'format' => 'default',
    'multiple' => array(
      'multiple_number' => '',
      'multiple_from' => '',
      'multiple_to' => '',
      'group' => TRUE,
    ),
    'repeat' => array(
      'show_repeat_rule' => '',
    ),
    'fromto' => array(
      'fromto' => 'both',
    ),
    'exclude' => 0,
    'id' => 'field_events_end_value',
    'table' => 'node_data_field_events_end',
    'field' => 'field_events_end_value',
    'relationship' => 'none',
  ),
  'field_events_loc_value' => array(
    'label' => 'Location',
    '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_node' => 0,
    'label_type' => 'widget',
    'format' => 'default',
    'multiple' => array(
      'group' => TRUE,
      'multiple_number' => '',
      'multiple_from' => '',
      'multiple_reversed' => FALSE,
    ),
    'exclude' => 0,
    'id' => 'field_events_loc_value',
    'table' => 'node_data_field_events_loc',
    'field' => 'field_events_loc_value',
    'relationship' => 'none',
  ),
  'title' => array(
    'id' => 'title',
    'table' => 'node',
    'field' => 'title',
  ),
));
$handler->override_option('filters', array(
  'type' => array(
    'operator' => 'in',
    'value' => array(
      'events' => 'events',
    ),
    'group' => '0',
    'exposed' => FALSE,
    'expose' => array(
      'operator' => FALSE,
      'label' => '',
    ),
    'id' => 'type',
    'table' => 'node',
    'field' => 'type',
    'relationship' => 'none',
  ),
));
$handler->override_option('access', array(
  'type' => 'none',
));
$handler->override_option('cache', array(
  'type' => 'none',
));
$handler->override_option('items_per_page', 0);
$handler->override_option('distinct', 0);
$handler->override_option('style_plugin', 'table');
$handler->override_option('style_options', array(
  'grouping' => '',
  'override' => 1,
  'sticky' => 0,
  'order' => 'asc',
  'columns' => array(
    'field_event_comm_value' => 'field_event_comm_value',
    'field_event_date_value' => 'field_event_date_value',
    'field_event_type_value' => 'field_event_type_value',
  ),
  'info' => array(
    'field_event_comm_value' => array(
      'separator' => '',
    ),
    'field_event_date_value' => array(
      'separator' => '',
    ),
    'field_event_type_value' => array(
      'sortable' => 0,
      'separator' => '',
    ),
  ),
  'default' => '-1',
));
$handler = $view->new_display('page', 'Page', 'page_1');
$handler->override_option('path', 'event-test');
$handler->override_option('menu', array(
  'type' => 'none',
  'title' => '',
  'description' => '',
  'weight' => 0,
  'name' => 'navigation',
));
$handler->override_option('tab_options', array(
  'type' => 'none',
  'title' => '',
  'description' => '',
  'weight' => 0,
  'name' => 'navigation',
));

and the SQL

SELECT node.nid AS nid,
   node_data_field_events_begin.field_events_begin_value AS node_data_field_events_begin_field_events_begin_value,
   node.language AS node_language,
   node.type AS node_type,
   node.vid AS node_vid,
   node_data_field_events_begin.field_events_end_value AS node_data_field_events_begin_field_events_end_value,
   node_data_field_events_begin.field_events_loc_value AS node_data_field_events_begin_field_events_loc_value,
   node.title AS node_title
 FROM drup_node node 
 LEFT JOIN drup_content_type_events node_data_field_events_begin ON node.vid = node_data_field_events_begin.vid
 WHERE node.type in ('events')

b) I am using the nodeaccess module.

c) I am using Drupal 6.14.

I have no intention of giving normal user "administer views" right. I just discovered that while I was trying to figure out why I got duplicates as a regular user but not as admin.

Thank you very much for your help.

dawehner’s picture

Status: Postponed (maintainer needs more info) » Fixed

c) I am using Drupal 6.14.

Bang! Here is the problem :)

Update to 6.16 and the problem will hopefully be blown away. There is a long long issue on drupal.org where this was fixed for 6.16.

kcpau’s picture

That fixed it. Thank you very much.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.