Closed (fixed)
Project:
Views (for Drupal 7)
Version:
7.x-3.x-dev
Component:
page displays
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
31 Jan 2011 at 12:16 UTC
Updated:
31 May 2012 at 13:31 UTC
Jump to comment: Most recent file
Comments
Comment #1
ccheu commentedIndeed. I'm experiencing almost the same. I can see the pager only when I am logged in as administrator. If I login as authenticated user or even using Facebook Connect (Drupal for Facebook - fb_connect.module) I cannot see the pager.
Comment #2
MatthijsG commentedWhat is your version?
Comment #3
ccheu commentedThe version I am having problem with is 7.x-3.x-dev.
Comment #4
ccheu commentedSorry. I shouldn't change the version on your thread! :)
Comment #5
bojanz commentedActually, all bug reports should be against -dev, since we've had quite a number of fixes committed since alpha1.
Unfortunately, I can't reproduce this (d7, views 3 dev). Tried both the full pager & the mini pager, and it shows for anonymous users.
Can you:
1) Export the problematic View
2) Revert to the default Drupal theme and see if it's okay then.
Comment #6
ccheu commentedMine is as follows.
$view = new view;
$view->name = 'list_latest';
$view->description = '';
$view->tag = 'Test List';
$view->base_table = 'node';
$view->human_name = 'List - Latest';
$view->core = 7;
$view->api_version = '3.0-alpha1';
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
/* Display: Defaults */
$handler = $view->new_display('default', 'Defaults', 'default');
$handler->display->display_options['access']['type'] = 'none';
$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'] = 'full';
$handler->display->display_options['pager']['options']['items_per_page'] = '2';
$handler->display->display_options['pager']['options']['offset'] = '0';
$handler->display->display_options['pager']['options']['id'] = '0';
$handler->display->display_options['pager']['options']['expose']['items_per_page_options_all'] = 0;
$handler->display->display_options['style_plugin'] = 'grid';
$handler->display->display_options['style_options']['fill_single_line'] = 1;
$handler->display->display_options['row_plugin'] = 'fields';
/* Field: Fields: field_photo */
$handler->display->display_options['fields']['entity_id_3']['id'] = 'entity_id_3';
$handler->display->display_options['fields']['entity_id_3']['table'] = 'field_data_field_photo';
$handler->display->display_options['fields']['entity_id_3']['field'] = 'entity_id';
$handler->display->display_options['fields']['entity_id_3']['label'] = '';
$handler->display->display_options['fields']['entity_id_3']['alter']['alter_text'] = 0;
$handler->display->display_options['fields']['entity_id_3']['alter']['make_link'] = 0;
$handler->display->display_options['fields']['entity_id_3']['alter']['absolute'] = 0;
$handler->display->display_options['fields']['entity_id_3']['alter']['trim'] = 0;
$handler->display->display_options['fields']['entity_id_3']['alter']['word_boundary'] = 1;
$handler->display->display_options['fields']['entity_id_3']['alter']['ellipsis'] = 1;
$handler->display->display_options['fields']['entity_id_3']['alter']['strip_tags'] = 0;
$handler->display->display_options['fields']['entity_id_3']['alter']['html'] = 0;
$handler->display->display_options['fields']['entity_id_3']['element_label_colon'] = 1;
$handler->display->display_options['fields']['entity_id_3']['element_default_classes'] = 1;
$handler->display->display_options['fields']['entity_id_3']['hide_empty'] = 0;
$handler->display->display_options['fields']['entity_id_3']['empty_zero'] = 0;
$handler->display->display_options['fields']['entity_id_3']['click_sort_column'] = 'fid';
$handler->display->display_options['fields']['entity_id_3']['settings'] = array(
'image_style' => 'grid_medium',
'image_link' => 'content',
);
/* Field: Node: Title */
$handler->display->display_options['fields']['title']['id'] = 'title';
$handler->display->display_options['fields']['title']['table'] = 'node';
$handler->display->display_options['fields']['title']['field'] = 'title';
$handler->display->display_options['fields']['title']['label'] = '';
$handler->display->display_options['fields']['title']['alter']['alter_text'] = 0;
$handler->display->display_options['fields']['title']['alter']['make_link'] = 0;
$handler->display->display_options['fields']['title']['alter']['absolute'] = 0;
$handler->display->display_options['fields']['title']['alter']['trim'] = 1;
$handler->display->display_options['fields']['title']['alter']['max_length'] = '100';
$handler->display->display_options['fields']['title']['alter']['word_boundary'] = 1;
$handler->display->display_options['fields']['title']['alter']['ellipsis'] = 1;
$handler->display->display_options['fields']['title']['alter']['strip_tags'] = 0;
$handler->display->display_options['fields']['title']['alter']['html'] = 0;
$handler->display->display_options['fields']['title']['element_label_colon'] = 1;
$handler->display->display_options['fields']['title']['element_default_classes'] = 1;
$handler->display->display_options['fields']['title']['hide_empty'] = 0;
$handler->display->display_options['fields']['title']['empty_zero'] = 0;
$handler->display->display_options['fields']['title']['link_to_node'] = 1;
/* Field: Fields: field_number */
$handler->display->display_options['fields']['entity_id']['id'] = 'entity_id';
$handler->display->display_options['fields']['entity_id']['table'] = 'field_data_field_number';
$handler->display->display_options['fields']['entity_id']['field'] = 'entity_id';
$handler->display->display_options['fields']['entity_id']['label'] = '';
$handler->display->display_options['fields']['entity_id']['alter']['alter_text'] = 0;
$handler->display->display_options['fields']['entity_id']['alter']['make_link'] = 0;
$handler->display->display_options['fields']['entity_id']['alter']['absolute'] = 0;
$handler->display->display_options['fields']['entity_id']['alter']['trim'] = 0;
$handler->display->display_options['fields']['entity_id']['alter']['word_boundary'] = 1;
$handler->display->display_options['fields']['entity_id']['alter']['ellipsis'] = 1;
$handler->display->display_options['fields']['entity_id']['alter']['strip_tags'] = 0;
$handler->display->display_options['fields']['entity_id']['alter']['html'] = 0;
$handler->display->display_options['fields']['entity_id']['element_label_colon'] = 1;
$handler->display->display_options['fields']['entity_id']['element_default_classes'] = 1;
$handler->display->display_options['fields']['entity_id']['hide_empty'] = 0;
$handler->display->display_options['fields']['entity_id']['empty_zero'] = 0;
$handler->display->display_options['fields']['entity_id']['settings'] = array(
'thousand_separator' => ',',
'decimal_separator' => '.',
'scale' => '0',
'prefix_suffix' => 1,
);
/* Field: Node: Post date */
$handler->display->display_options['fields']['created']['id'] = 'created';
$handler->display->display_options['fields']['created']['table'] = 'node';
$handler->display->display_options['fields']['created']['field'] = 'created';
$handler->display->display_options['fields']['created']['label'] = 'Listed';
$handler->display->display_options['fields']['created']['alter']['alter_text'] = 0;
$handler->display->display_options['fields']['created']['alter']['make_link'] = 0;
$handler->display->display_options['fields']['created']['alter']['absolute'] = 0;
$handler->display->display_options['fields']['created']['alter']['external'] = 0;
$handler->display->display_options['fields']['created']['alter']['trim'] = 0;
$handler->display->display_options['fields']['created']['alter']['nl2br'] = 0;
$handler->display->display_options['fields']['created']['alter']['word_boundary'] = 1;
$handler->display->display_options['fields']['created']['alter']['ellipsis'] = 1;
$handler->display->display_options['fields']['created']['alter']['strip_tags'] = 0;
$handler->display->display_options['fields']['created']['alter']['html'] = 0;
$handler->display->display_options['fields']['created']['element_label_colon'] = 1;
$handler->display->display_options['fields']['created']['element_default_classes'] = 1;
$handler->display->display_options['fields']['created']['hide_empty'] = 0;
$handler->display->display_options['fields']['created']['empty_zero'] = 0;
$handler->display->display_options['fields']['created']['date_format'] = 'time ago';
/* Sort criterion: Node: Post date */
$handler->display->display_options['sorts']['created']['id'] = 'created';
$handler->display->display_options['sorts']['created']['table'] = 'node';
$handler->display->display_options['sorts']['created']['field'] = 'created';
$handler->display->display_options['sorts']['created']['order'] = 'DESC';
/* Filter: Node: Published */
$handler->display->display_options['filters']['status']['id'] = 'status';
$handler->display->display_options['filters']['status']['table'] = 'node';
$handler->display->display_options['filters']['status']['field'] = 'status';
$handler->display->display_options['filters']['status']['value'] = '1';
/* Filter: Node: Type */
$handler->display->display_options['filters']['type']['id'] = 'type';
$handler->display->display_options['filters']['type']['table'] = 'node';
$handler->display->display_options['filters']['type']['field'] = 'type';
$handler->display->display_options['filters']['type']['value'] = array(
'content_type_list' => 'content_type_list',
);
/* Filter: Fields: field_list_type (field_list_type) */
$handler->display->display_options['filters']['field_list_type_value']['id'] = 'field_list_type_value';
$handler->display->display_options['filters']['field_list_type_value']['table'] = 'field_data_field_list_type';
$handler->display->display_options['filters']['field_list_type_value']['field'] = 'field_list_type_value';
$handler->display->display_options['filters']['field_list_type_value']['value'] = array(
'Type1' => 'Type1',
);
$handler->display->display_options['filters']['field_list_type_value']['expose']['operator'] = 'field_list_type_value_op';
$handler->display->display_options['filters']['field_list_type_value']['expose']['label'] = 'Lists';
$handler->display->display_options['filters']['field_list_type_value']['expose']['identifier'] = 'field_list_type_value';
$handler->display->display_options['filters']['field_list_type_value']['expose']['optional'] = 0;
$handler->display->display_options['filters']['field_list_type_value']['expose']['remember'] = 1;
$handler->display->display_options['filters']['field_list_type_value']['expose']['reduce'] = 0;
/* Display: Page */
$handler = $view->new_display('page', 'Page', 'page_1');
$handler->display->display_options['path'] = 'list';
/* Display: Block */
$handler = $view->new_display('block', 'Block', 'block_1');
$handler->display->display_options['defaults']['style_plugin'] = FALSE;
$handler->display->display_options['style_plugin'] = 'gmap';
$handler->display->display_options['style_options']['macro'] = '[gmap |id=usermap|width=100%|height=230px|behavior= +nomousezoom +autozoom]';
$handler->display->display_options['style_options']['markertype'] = 'alt small blue';
$handler->display->display_options['style_options']['latfield'] = 'entity_id_3';
$handler->display->display_options['style_options']['lonfield'] = 'entity_id_3';
$handler->display->display_options['style_options']['markerfield'] = 'entity_id_3';
$handler->display->display_options['style_options']['enablermt'] = 0;
$handler->display->display_options['style_options']['rmtfield'] = 'entity_id_3';
$handler->display->display_options['style_options']['tooltipenabled'] = 1;
$handler->display->display_options['style_options']['tooltipfield'] = 'title';
$handler->display->display_options['defaults']['style_options'] = FALSE;
$handler->display->display_options['defaults']['row_plugin'] = FALSE;
$handler->display->display_options['row_plugin'] = 'fields';
$handler->display->display_options['defaults']['row_options'] = FALSE;
$handler->display->display_options['block_description'] = 'Latest List GMap';
$translatables['list_latest'] = array(
t('Defaults'),
t('more'),
t('Apply'),
t('Reset'),
t('Sort By'),
t('Asc'),
t('Desc'),
t('Items per page'),
t('- All -'),
t('Offset'),
t('Listed'),
t('Lists'),
t('Page'),
t('Block'),
t('Latest List GMap'),
);
Comment #7
merlinofchaos commentedIs there something else on the page with a pager id that might be interfering? Another view in a block, perhaps, configured to use the pager but not actually with enough items to page?
Comment #8
ccheu commentedMerlinofchaos, thanks for the reply.
The thing that perplexed me is that it worked fine when I logged in as the administrator. The pager did not appear when logged in as viewed as anonymous, logged in as authenticated user or logged in via Facebook Connect (Drupal for Facebook.)
Many thanks.
Chang
Comment #9
agentrickardI am seeing this behavior, but only when using a Node Access module.
Comment #10
agentrickardIn my case, here's what happens to the query when countQuery() is invoked from views_plugin_query_default.inc execute().
Running through SelectQuery countQuery() in select.inc.
Notes are the sub-sections of the query alteration functions run by http://api.drupal.org/api/drupal/includes--database--select.inc/function....
The original query comes from views.
This might be a core bug, or it may be that the Views query isn't structured as core expects.
Comment #11
agentrickardOddly, marking the View itself as distinct has no effect.
Comment #12
MatthijsG commentedHere's my response:
No pager as anonymous visitor with:
* custom theme
* Garland
* Bartik
Below my exported code. AFAIK i didn't touch the standard View. It's a new site.
Could it be something in the Panels, because this View is regulated by Panels?
Comment #13
merlinofchaos commentedLooks like there may be a core bug with the count query here based on agentrickard's data. Not quite sure what to do yet. Need to get Crell to look at this, I think, and advise.
Comment #14
agentrickard@Lenn-art
[edit] I see that you are using OG, that would explain part of it. I think we have a Node Access issue based on how core and Views interact. You aren't doing anything "wrong" here. Panels is likely not an issue.
Comment #15
MatthijsG commentedIs there any way i could provide more output to help, like some results?
Comment #16
agentrickard@Lenn-art
No need. The fact that you're using a standard OG View provides us with most of the information we need for debugging. The problem is that this is a very complex bug that might be part of Drupal core, and so a fix might take some time.
Comment #17
kevin p davison commentedI just found this issue, and I'm having the same problem with the pager for anonymous users. I did try Bartik instead of my own theme, and the problem still exists.
* http://drupal.org/node/1059840
Kevin
Comment #18
mjgruta commentedI also have this problem using Views 7.x-3.x-dev (Feb 17)
As I remember from the previews version of views dev this past few weeks, this problem only occurs when I enable "Use Ajax" but now even when I disable Use Ajax the pager is still missing on visitors.
Comment #19
desmondmorris commentedSubscribe
Comment #20
blackice2999 commentedHi,
same here logged in users and anonymous users doesnt see any pager. User 1 can see them.
@merlinofchaos: You talk about a node access module, i use "Domain Access" i will try to debug them tonight.
regards
Dennis
Comment #21
ccheu commentedDennis, please keep us posted. Danke schön!
Comment #22
blackice2999 commentedHi,
since i talked long with "dereine" we have found a possible solution. The access modules uses preExecute() and this must be invoked from the view default query.
i attached a patch (agains dev branch from today) that worked for me but iam not fully understand the "why" and hope @merlinofchaos can explain it a little.
regards
Dennis
Comment #23
dawehnerHere is the code from pagerdefault:
So basically you have to execute preExecute before running countQuery.
Comment #24
agentrickardThe code from #22 fixes my problem, as reported in #10.
Comment #25
agentrickardAnd a patch.
Comment #26
agentrickardWith a slightly better comment.
Comment #27
agentrickardDiscusses with @dereine in IRC and obsessively documented inline patch.
Comment #28
dawehnerCommited the latest version to git.
Thanks for all this community work. This is what makes drupal special
Comment #29
ytsurkhey,
i got this issue here
(no pager shown if user:1 ..)
- maybe realted
http://drupal.org/node/1068198
edit:
i tried the patch #22 (no help so far)where to change the snippet of #23 ??
don't get the patches
the last only got (which is what i'm using ..)
but for me, like mentioned above, pager is not shown if admin (tried both snippets) .. maybe something different ...
Comment #30
dawehnerPreExecute is just needed for the countQuery. This is fine. Let's use the other issue.
Comment #32
mattez commented#7 solved my problem. THANX a lot!!
I have attached views. I set them to "display all" (no pager) => pager on parent/main view is now visible and start working. Thanx again!
Comment #33
michaellenahan commentedSame here: #7 #32 solved my problem. Thank you!
In my case: the problematic main view had a "View area" in its header.
In the view referred to by the view area, I removed the pager, setting it to display all items.
(This pager on the header view had no real function anyway).
Now, the pager on the main view works properly and shows for all visitors.