I have created many views using Views 2 and Table Wizard. The views each consist of a parent display (page) and two views attachments. As "user 1", I preview the views when I navigate to the URLs that were assigned—using links, menu items that were created, or by typing the locations into browser—the result is perfectly displayed as I created it: attachment #1, then a header and attachment #2, and the parent view then its footer. However, an authenticated user is unable to see the attachment views, so all they get is a parent view (with a pager) and the footer… no attachments are displayed to them. After much seeking, I cannot figure out the cause. Below is a sample of the Views export. I appreciate any feedback, advice, or encouragement that anyone can offer, thanks.

<?php
$handler = $view->new_display('page', 'employee123', 'page_2');
$handler->override_option('filters', array(
  'employee_id' => array(
    'operator' => '=',
    'value' => 'employee123',
    'group' => '0',
    'exposed' => FALSE,
    'expose' => array(
      'operator' => 'employee_id_op',
      'label' => 'employee_report_summaries: employee_id',
      'use_operator' => 0,
      'identifier' => 'employee_id',
      'optional' => 1,
      'remember' => 0,
    ),
    'case' => 0,
    'id' => 'employee_id',
    'table' => 'employee_report_summaries',
    'field' => 'employee_id',
    'relationship' => 'none',
    'override' => array(
      'button' => 'Use default',
    ),
  ),
  'plan_year_end' => array(
    'operator' => '!=',
    'value' => '12/31/1901',
    'group' => '0',
    'exposed' => FALSE,
    'expose' => array(
      'operator' => FALSE,
      'label' => '',
    ),
    'case' => 1,
    'id' => 'plan_year_end',
    'table' => 'employee_report_summaries',
    'field' => 'plan_year_end',
    'override' => array(
      'button' => 'Use default',
    ),
    'relationship' => 'none',
  ),
));
$handler->override_option('access', array(
  'type' => 'role',
  'role' => array(
    '490' => 490,
  ),
));
$handler->override_option('header', '');
$handler->override_option('header_format', '1');
$handler->override_option('path', 'report_summary/fund/employee123');
$handler->override_option('menu', array(
  'type' => 'normal',
  'title' => 'Report Summaries',
  'description' => 'Report Summaries',
  'weight' => '0',
  'name' => 'secondary-links',
));
$handler->override_option('tab_options', array(
  'type' => 'none',
  'title' => '',
  'description' => '',
  'weight' => 0,
  'name' => 'navigation',
));
$handler = $view->new_display('attachment', 'employee123 Attach', 'attachment_1');
$handler->override_option('fields', array(
  'employee_id' => array(
    'label' => 'Last 4 Lastname',
    '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,
    'exclude' => 1,
    'id' => 'employee_id',
    'table' => 'employees',
    'field' => 'employee_id',
    'override' => array(
      'button' => 'Use default',
    ),
    'relationship' => 'none',
  ),
  'firstname' => array(
    'label' => '',
    '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' => 1,
    'empty_zero' => 0,
    'exclude' => 0,
    'id' => 'firstname',
    'table' => 'employees',
    'field' => 'firstname',
    'override' => array(
      'button' => 'Use default',
    ),
    'relationship' => 'none',
  ),
  'middle' => array(
    'label' => '',
    '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' => 1,
    'empty_zero' => 0,
    'exclude' => 0,
    'id' => 'middle',
    'table' => 'employees',
    'field' => 'middle',
    'override' => array(
      'button' => 'Use default',
    ),
    'relationship' => 'none',
  ),
  'lastname' => array(
    'label' => '',
    '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,
    'exclude' => 0,
    'id' => 'lastname',
    'table' => 'employees',
    'field' => 'lastname',
    'override' => array(
      'button' => 'Use default',
    ),
    'relationship' => 'none',
  ),
  'honor' => array(
    'label' => '',
    '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' => 1,
    'empty_zero' => 0,
    'exclude' => 0,
    'id' => 'honor',
    'table' => 'employees',
    'field' => 'honor',
    'override' => array(
      'button' => 'Use default',
    ),
    'relationship' => 'none',
  ),
  'ssn' => array(
    'label' => 'SSN (Last 4)',
    '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,
    'exclude' => 0,
    'id' => 'ssn',
    'table' => 'employees',
    'field' => 'ssn',
    'override' => array(
      'button' => 'Use default',
    ),
    'relationship' => 'none',
  ),
  'name' => array(
    'label' => '',
    '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,
    'exclude' => 0,
    'id' => 'name',
    'table' => 'role',
    'field' => 'name',
    'override' => array(
      'button' => 'Use default',
    ),
    'relationship' => 'none',
  ),
));
$handler->override_option('filters', array(
  'last4lastname_1' => array(
    'operator' => '=',
    'value' => 'employee123',
    'group' => '0',
    'exposed' => FALSE,
    'expose' => array(
      'operator' => FALSE,
      'label' => '',
    ),
    'case' => 0,
    'id' => 'last4lastname_1',
    'table' => 'employees',
    'field' => 'employee_id',
    'override' => array(
      'button' => 'Use default',
    ),
    'relationship' => 'none',
  ),
));
$handler->override_option('access', array(
  'type' => 'role',
  'role' => array(
    '490' => 490,
  ),
));
$handler->override_option('header', '');
$handler->override_option('footer', '');
$handler->override_option('items_per_page', 1);
$handler->override_option('link_display', 'page_2');
$handler->override_option('style_plugin', 'default');
$handler->override_option('style_options', array(
  'grouping' => '',
));
$handler->override_option('attachment_position', 'before');
$handler->override_option('inherit_arguments', 1);
$handler->override_option('inherit_exposed_filters', 0);
$handler->override_option('inherit_pager', FALSE);
$handler->override_option('render_pager', TRUE);
$handler->override_option('displays', array(
  'page_2' => 'page_2',
  'default' => 0,
  'page_1' => 0,
  'page_3' => 0,
));
?>

Comments

dawehner’s picture

Status: Active » Fixed

$handler->override_option('access', array(
  'type' => 'role',
  'role' => array(
    '490' => 490,
  ),
));

You have access settings enabled for this view. I guess 490 is not the authenticated user

devilhoused’s picture

Status: Fixed » Active

Thank you for your consideration. I am re-activating this issue because it is not solved. I returned to the view and unassigned the access settings for the attachment views that are not showing up and cleared all caches. The attachment views still do not show for the authenticated user(s). Also, the access settings were consistent between all displays in the view for role 490, so that is the correct role for that user. Do you have any other suggestions? Thanks.

devilhoused’s picture

StatusFileSize
new36.24 KB

Furthermore, in an exported view, not only the default and parent views allow 'path' => 'path/to/view', to be defined, but also the attachment views have 'path' => '',. However, these values are left blank. This is not configurable in the Views UI, and I do not expect that they are necessary for the view or attachment views to function. I am still currently at a loss for why the attachment views do not appear for authenticated users.

I have attached a more suitable example of a Views export that gives a bit more. This time, I have prepended line numbers to the lines in the document. My deadline is fast approaching and I really appreciate if anyone can please assist me in this struggle. Thanks.

dawehner’s picture

This time, I have prepended line numbers to the lines in the document. My deadline is fast approaching and I really appreciate if anyone can please assist me in this struggle. Thanks.

Sadly noone is able to import it .

devilhoused’s picture

StatusFileSize
new29.92 KB

So true! My apologies. I have reattached the document. Please find it provided this time without the line numbers. Thanks again.

devilhoused’s picture

I notice that: if a user is given permission to administer views, they can see the attachment views. What this means is that only users with "Views Module > Administer Views" permission can view attachment views. However, this is not at all my intent. Once again, I am unsure of why or what this means.

If I give the permission to administer views to all concerned users and also choose "Views > Tools > 'Do not show hover links over views'", the users won't have direct access to modify the views. Then site admins also lose the convenience of the hover links and a "backdoor" via URL navigation is left wide-open.

I wonder whether this issue could turn out to be a bug… What is your take? Thanks.

devilhoused’s picture

Category: support » bug

I am switching this issue to a bug report because when I switched on "Views > Tools > 'Do not show hover links over views'", I lost the ability to see any of the attachment views.

Like I stated previously, my idea was to implement the Path Access module, restrict access to "admin/build/views/*" from the users' role, disable views hover links, and allow users to "administer views". Seeing as I can't use this workaround, I am sure this is a bug…

    The modules used for the views are:

  1. Views 2 (used patch #348975: Add the Ability to Clone a Display)
  2. Table Wizard
  3. Schema
  4. Also used to achieve desired effect:

  5. Path Access
dawehner’s picture

Status: Active » Postponed (maintainer needs more info)
Like I stated previously, my idea was to implement the Path Access module, restrict access to "admin/build/views/*" from the users' role, disable views hover links, and allow users to "administer views". Seeing as I can't use this workaround, I am sure this is a bug…

This is a horrible idea!

Did you removed the access check to check whether it works then for the authenticated user?

devilhoused’s picture

This is a horrible idea!

I agree. It was a most recent trial to come up with a "workaround" while this attachment views display issue is worked out, until I had a more permanent solution. Although, the users' role should not have access to anything at "admin/*". It causes problems via URL navigation. That's why something like Path Access was tried. Initially I did not employ this method.

Did you removed the access check to check whether it works then for the authenticated user?

I uninstalled Path Access and enabled "Do not show hover links over views". The attachment views disappeared for admin still, with that option enabled. That option was only used for that crazy workaround… The authenticated users' role has never been able to see the attachment views, even without Path Access or the workaround.

devilhoused’s picture

I appreciate your help, dereine. What other information will help further this investigation? Thanks.

dawehner’s picture

I don't understand the people. What's the reason to write a new comment after three days.

With

Did you removed the access check to check whether it works then for the authenticated user?

i wanted you to ask to change the view. I'm still not convinced that the authenticated user has the rolename "409".

devilhoused’s picture

StatusFileSize
new113.75 KB

I don't understand the people. What's the reason to write a new comment after three days.

> Can I ask what this means?

i wanted you to ask to change the view. I'm still not convinced that the authenticated user has the rolename "409".

I have close to 500 members and each one is represented by a different role, while they all share another role. Like I said: When I preview the views or see them as user1 admin everything shows up perfectly. It is when I log in as any other user that the attachment views are not visible. Also when I disable the views hover links the attachment views are not visible.

I have attached another sample of my code. It is a full view of displays and attachments. Hopefully this one gives more clarity. Thanks.

dawehner’s picture

Pushing issues sucks!

So you show different views to different users?

devilhoused’s picture

So you show different views to different users?

Yes, I have one (1) custom page display per user. Each 1 is combined with 2 attachment views displays—each of which are also custom for the users. The run down is something like this…

Example Structure of Views:

Attachment View 1 (Personal identifying data, unformatted)
Header Body
Attachment View 2 (Totals for data, table)
Parent View Page Display (Main data, table)
<— possible pager depending on length —>
Footer Body

Thanks for your response.

[*This post was edited by its author for clarity.]

devilhoused’s picture

What I should say is that: the views for each user are similar among the users, with the displays filtered to one user at a time. Each user will see data specific to his user only—that is what I meant by "custom", each user has a separate view display built for him. That data is exposed to Views by Table Wizard. The views displays are currently displayed correctly as I described above but only for me (user1). No other user can see any views besides the page display (main) view and footer. The attachment views and their headers are equally important. I am unsure because when I preview or navigate to the URLs as user1, the results are fine. When I access via any login other than user1, attachment views disappear…

I am staying at this.

[*This post was edited by its author for clarity.]

dawehner’s picture

As long noone can reproduce it and as long noone has time to do it noone can help you :(

devilhoused’s picture

As long noone can reproduce it and as long noone has time to do it noone can help you :(

Thanks anyway for your response. Unfortunately I cannot reproduce the issue for anyone: I can only give information to reproduce the issue. I see that time is of essence…

I cannot imagine that a solution lies in lessening my application demands, without me 1st directly solving the issue because the Drupal CMS is quite robust. It seems in some cases that the issue queue is better geared toward aiding in general development.

Is there anyone who is interested in investigating this issue with me? I do not think that you need to create the number of views or users that I have: 1 or 2 should do. Please express your interest.

*I will work on putting together an SQL document for someone to easily import into a DB.

Thanks.

dawehner’s picture

The interesting point of the issue queue is that if there is really a but many issues will be created. This is not the case here, yet. So i guess this is not a bug, but a wrong configuration.

devilhoused’s picture

Category: bug » support

You are very right dereine. I have switched this issue back to a support request because it is indeed a misconfiguration on my part. It has been determined that the problem lies somewhere in my theme. I'm not sure where yet, so I am still investigating my theme.

Thanks.

devilhoused’s picture

Status: Postponed (maintainer needs more info) » Closed (fixed)

The problem was theming of the view. I reset views-view.tpl.php to its defaults and the disappearing views attachments reappeared. It's easy to forget some simple rules of troubleshooting…

My stress level soared after more than 8 months' development on a new site feature. Thanks to dereine for the patience and drive to solve this issue.