Hi, i've tried to set a view that displays a page like an alphabetical directory in A/B/C format that enables to access to all the blogs aggregated in a simplefeed installation and sort it by "name of blog" (feed). So the goal is display in the main page all the A/B/C letters and when you click on one just see all the blogs with this first letter in its name.

If i access to /url/blogs/M (letter M) there are displayed all the blogs with a name or title starting with "M". And this is ok with every letter. ;)

But i i go to "main page" of this directory i've got this error that i can't solve in any way:

user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(node.title, 1) FROM node node WHERE (node.status = '1') AND (node.type IN ('fe' at line 1 query: SELECT LEFT(node.title, 1) AS letter, count(node.nid) AS num_nodes, node.LEFT(node.title, 1) AS letter_LEFT(node.title, 1) FROM node node WHERE (node.status = '1') AND (node.type IN ('feed')) GROUP BY LEFT(node.title, 1), letter_LEFT(node.title, 1) ORDER BY letter_LEFT(node.title, 1) ASC LIMIT 0, 10 in /home/.joy/user/url.com/drupal/includes/database.mysql.inc on line 172.

And this is the view i created:

 $view = new stdClass();
  $view->name = 'totselsblogs';
  $view->description = 'Llistat alfabètic de tots els blogs';
  $view->access = array (
  0 => '1',
);
  $view->view_args_php = '';
  $view->page = TRUE;
  $view->page_title = 'Blogs per titol';
  $view->page_header = '';
  $view->page_header_format = '1';
  $view->page_footer = '';
  $view->page_footer_format = '1';
  $view->page_empty = '';
  $view->page_empty_format = '1';
  $view->page_type = 'teaser';
  $view->url = 'blogs/tots';
  $view->use_pager = TRUE;
  $view->nodes_per_page = '10';
  $view->menu = TRUE;
  $view->menu_title = 'Tots els blogs';
  $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 = 'tab';
  $view->menu_parent_tab_weight = '0';
  $view->menu_parent_title = '';
  $view->sort = array (
    array (
      'tablename' => 'node',
      'field' => 'changed',
      'sortorder' => 'ASC',
      'options' => 'normal',
    ),
  );
  $view->argument = array (
    array (
      'type' => 'nodeletter',
      'argdefault' => '4',
      'title' => '%1',
      'options' => '1',
      'wildcard' => '',
      'wildcard_substitution' => '',
    ),
  );
  $view->field = array (
    array (
      'tablename' => 'node',
      'field' => 'title',
      'label' => '',
      'handler' => 'views_handler_field_nodelink',
      '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 => 'feed',
),
    ),
  );
  $view->exposed_filter = array (
  );
  $view->requires = array(node);
  $views[$view->name] = $view;

ANY HELP? Thanks!

May be there are other ways to display thins info and may be the error is because the view is not well done. (i'm using views 5.x1-6 and simplefeed 5.x-1.0)

Waiting a response from you, regards.

Comments

csevb10’s picture

Status: Active » Closed (fixed)

This is a views module error, and not related to the simplefeed implementation. You should move this issue to the views issue queue and repost it, if you haven't already handled the issue. This issue arises with any content type when using argument default of summary. The error changes but continues to cause problems once you add in the option value of 1.