Hello,

I'm using Drupal 5 and Views 5.x-1.6 for displaying products on some e-commence (Ubercart) site...
View theme files has been generated using Views' Theme Wizard (so I have rather standard views-list-products.tpl.php theme file and phptemplate_views_view_list_products function in template.php).

The point is that my view completely ignores "Use Pager" (checked) and "Nodes per page" (set to 10) settings.
All the time it flushes all of my products without a pager. When I try to debug it (using var_dump in phptemplate_views_view_list_products function in template.php) I got:

["use_pager"]=>
bool(false)
["nodes_per_page"]=>
string(1) "10"

So "use_pager" setting is ignored :/
In the same time I can see it set to TRUE in export of my view...

I've spent lot of time looking for solution but I still don't know why it happens.

Cheers,
Marcin

Comments

dawehner’s picture

could you please export your view?

do you use panels to embed the view?

kotu’s picture

My view provides a page, frontpage...
Generally speaking I have a problem with outputing pager, I can limit teaser nodes to some numeric value but pager doesn't appear and I'm not able to see additional items... :(

It's an export:

  $view = new stdClass();
  $view->name = 'products';
  $view->description = '';
  $view->access = array (
);
  $view->view_args_php = '';
  $view->page = TRUE;
  $view->page_title = '';
  $view->page_header = '';
  $view->page_header_format = '3';
  $view->page_footer = '';
  $view->page_footer_format = '2';
  $view->page_empty = '<p>Brak wynik&oacute;w dla wybranych kryteri&oacute;w wyszukiwania...</p>';
  $view->page_empty_format = '1';
  $view->page_type = 'list';
  $view->url = 'taxonomy/term';
  $view->use_pager = TRUE;
  $view->nodes_per_page = '5';
  $view->sort = array (
    array (
      'tablename' => 'node',
      'field' => 'random',
      'sortorder' => 'ASC',
      'options' => '',
    ),
  );
  $view->argument = array (
    array (
      'type' => 'taxid',
      'argdefault' => '2',
      'title' => '%1',
      'options' => '3',
      'wildcard' => '',
      'wildcard_substitution' => '',
    ),
  );
  $view->field = array (
    array (
      'tablename' => 'node_data_field_image_cache',
      'field' => 'field_image_cache_fid',
      'label' => '',
      'handler' => 'content_views_field_handler_first',
      'options' => 'product_list_linked',
    ),
    array (
      'tablename' => 'node',
      'field' => 'title',
      'label' => '',
      'handler' => 'views_handler_field_nodelink',
      'options' => 'nolink',
    ),
    array (
      'tablename' => 'node',
      'field' => 'body',
      'label' => '',
      'handler' => 'views_handler_field_body',
    ),
    array (
      'tablename' => 'uc_products',
      'field' => 'sell_price',
      'label' => '',
    ),
    array (
      'tablename' => 'node',
      'field' => 'view',
      'label' => 'szczegóły',
    ),
    array (
      'tablename' => 'uc_products',
      'field' => 'buyitnowbutton',
      'label' => 'do koszyka',
    ),
  );
  $view->filter = array (
    array (
      'tablename' => 'node',
      'field' => 'status',
      'operator' => '=',
      'options' => '',
      'value' => '1',
    ),
    array (
      'tablename' => 'uc_products',
      'field' => 'is_product',
      'operator' => '=',
      'options' => '',
      'value' => '1',
    ),
    array (
      'tablename' => 'search_index',
      'field' => 'word',
      'operator' => '=',
      'options' => '',
      'value' => '',
    ),
    array (
      'tablename' => 'uc_product_stock',
      'field' => 'is_active',
      'operator' => '=',
      'options' => '',
      'value' => '1',
    ),
    array (
      'tablename' => 'uc_product_stock',
      'field' => 'stock',
      'operator' => '>=',
      'options' => '',
      'value' => '1',
    ),
    array (
      'tablename' => 'term_node_3',
      'field' => 'tid',
      'operator' => 'AND',
      'options' => '',
      'value' => array (
),
    ),
  );
  $view->exposed_filter = array (
    array (
      'tablename' => 'search_index',
      'field' => 'word',
      'label' => 'Słowa kluczowe',
      'optional' => '1',
      'is_default' => '0',
      'operator' => '1',
      'single' => '0',
    ),
    array (
      'tablename' => 'term_node_3',
      'field' => 'tid',
      'label' => 'Kategoria',
      'optional' => '0',
      'is_default' => '0',
      'operator' => '1',
      'single' => '1',
    ),
  );
  $view->requires = array(node, node_data_field_image_cache, uc_products, search_index, uc_product_stock, term_node_3);
  $views[$view->name] = $view;

esmerel’s picture

Status: Active » Closed (fixed)

Given the age of this issue, I have to presume it's either figured out or no longer relevant.