I've seen others with the same issue, but none of the fixes have seemed to make a difference on my site. Anyhow, I have an alphabetical view on the page ( http://www.yinyanghouse.com/theory/herbalmedicine/tcm_herbal_medicine_da... ) sorted by the node title. I get multiple letters "X" for examples shows up twice with (1) node but they both contain both "X" nodes.

* B (1)
* D (1)
* M (1)
* S (1)
* X (1)
* X (1)
* Y (1)
* Z (1)

From the "X" page:
*
Xi Jiao (Rhinoceros Horn)
*
Xuan Shen (Ningpo Figwort Root)

I don't know if this is a problem with views, or just my code. I've included the view itself below and would greatly appreciate any help in making this work correctly.

Here is the view:

  $view = new stdClass();
  $view->name = 'tcm_herbal_medicine_database';
  $view->description = 'First letter of term on top and related view on bottom of each page.';
  $view->access = array (
);
  $view->view_args_php = '';
  $view->page = TRUE;
  $view->page_title = 'TCM Herbal Medicine Database';
  $view->page_header = '<p>Our Traditional Chinese Medicine herbal database contains usage information for the majority of the herbs used in clinical settings around the world.  You may view the individual herbs by clicking on the first letter of the <strong>Chinese Name</strong> or by searching through other groupings such as <a href="/theory/herbalmedicine/tcm_herbs_by_channel">by channel</a>, <a href="/theory/herbalmedicine/tcm_herbs_by_property">properties</a>, or <a href="/theory/herbalmedicine/tcm_herbs_by_function">functions &amp; actions</a>.</p>
<p>This section is very much <strong>a work in progress</strong>, so please check back if you are not finding the herbal information you are looking for.</p>';
  $view->page_header_format = '3';
  $view->page_footer = '<br><br><div class="item-list"><ul><li><strong>Discussions</strong>:</li><li><a href="/theory/herbal_medicine_theory_discussions">Discuss Herbal Medicine</a></li></ul></div><p><a name="sources"></a></p><h3>Sources and More Information</h3><p>The information on our site is drawn from our own lecture notes and clinical experience.</p><p>For a complete list of valuable resources, see our <a href="/research/herbal_medicine_resources">Herbal Medicine Resources</a> section.</p>';
  $view->page_footer_format = '3';
  $view->page_empty = '';
  $view->page_empty_format = '1';
  $view->page_type = 'list';
  $view->url = 'theory/herbalmedicine/tcm_herbal_medicine_database';
  $view->use_pager = TRUE;
  $view->nodes_per_page = '10000';
  $view->menu = TRUE;
  $view->menu_title = '';
  $view->menu_tab = FALSE;
  $view->menu_tab_weight = '0';
  $view->menu_tab_default = FALSE;
  $view->menu_tab_default_parent = NULL;
  $view->menu_tab_default_parent_type = 'normal';
  $view->menu_parent_tab_weight = '0';
  $view->menu_parent_title = '';
  $view->sort = array (
    array (
      'tablename' => 'node',
      'field' => 'title',
      'sortorder' => 'ASC',
      'options' => '',
    ),
  );
  $view->argument = array (
    array (
      'type' => 'nodeletter',
      'argdefault' => '6',
      'title' => '%1',
      'options' => '1',
      'wildcard' => '',
      'wildcard_substitution' => '',
    ),
    array (
      'type' => 'nodeletter',
      'argdefault' => '2',
      'title' => '%2',
      'options' => '',
      'wildcard' => '',
      'wildcard_substitution' => '',
    ),
  );
  $view->field = array (
    array (
      'tablename' => 'node',
      'field' => 'title',
      'label' => '',
      'handler' => 'views_handler_field_nodelink',
      'sortable' => '1',
      'options' => 'link',
    ),
  );
  $view->filter = array (
    array (
      'tablename' => 'node',
      'field' => 'status',
      'operator' => '=',
      'options' => '',
      'value' => '1',
    ),
    array (
      'tablename' => 'node',
      'field' => 'type',
      'operator' => 'OR',
      'options' => '',
      'value' => array (
  0 => 'tcmindividualherb',
),
    ),
  );
  $view->exposed_filter = array (
  );
  $view->requires = array(node);
  $views[$view->name] = $view;

Comments

summit’s picture

Hi,

I saw you solved this. Could you tell me how? I have the same problem on a directory view?
Thanks for your reply!

greetings,
Martijn

Chad_Dupuis’s picture

Well I didn't really solve the issue. I ended up using the views alpha pager module which gave me what I was looking for. It works but it doesn't provide a node count, which would have been nice but isn't necessary.

sun’s picture

Status: Active » Fixed
Anonymous’s picture

Status: Fixed » Closed (fixed)

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