i just enable the module in drupal 7 alpha3. before i run update.php but he makes nothing
i enable backlink view and try to show in the node this caused this error. the view i enabled only for users..but guest see the link and get the same error if he passed

PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'db.search_node_links_to' doesn't exist: SELECT node.title AS node_title, node.nid AS nid FROM {node} node INNER JOIN {search_node_links_to} search_node_links_to ON node.nid = search_node_links_to.sid WHERE (( (node.status <> :db_condition_placeholder_0) AND (search_node_links_to.nid = :db_condition_placeholder_1) )); Array ( [:db_condition_placeholder_0] => 0 [:db_condition_placeholder_1] => 5 ) in views_plugin_pager->execute_count_query() (line 134 of ./modules/views/plugins/views_plugin_pager.inc).


dawehner’s picture

The problem is that

  // Search node links: forward links.
  $data['search_node_links_from']['table']['group'] = t('Search');
  $data['search_node_links_from']['table']['join'] = array(
    'node' => array(
      'arguments' => array('search_node_links', 'node', 'nid', 'nid', NULL, 'INNER'),
  $data['search_node_links_from']['sid'] = array(
    'title' => t('Links from'),
    'help' => t('Other nodes that are linked from the node.'),
    'argument' => array(
      'handler' => 'views_handler_argument_node_nid',
    'filter' => array(
      'handler' => 'views_handler_filter_equality',

  // Search node links: backlinks.
  $data['search_node_links_to']['table']['group'] = t('Search');
  $data['search_node_links_to']['table']['join'] = array(
    'node' => array(
      'arguments' => array('search_node_links', 'node', 'nid', 'sid', NULL, 'INNER'),
  $data['search_node_links_to']['nid'] = array(
    'title' => t('Links to'),
    'help' => t('Other nodes that link to the node.'),
    'argument' => array(
      'handler' => 'views_handler_argument_node_nid',
    'filter' => array(
      'handler' => 'views_handler_filter_equality',

gets interpretated as real tables, which is not true.

merlinofchaos’s picture

Hm. Does this fail in 6.x-3.x too? Or is this an artifact of the port to DBTNG?

Mark Trapp’s picture

I'm having a similar error using yesterday's dev snapshot and 7.0a3, but for a different cause. Perhaps this points to an issue with the port? If not, I'll open a new issue. Error was:

PDOException: SQLSTATE[42000]: Syntax error or access violation: 1064 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 '= field_data_body.entity_id AND field_data_body.etid = '1' WHERE (( (node.type I' at line 1: SELECT node.title AS node_title, node.nid AS nid, field_data_body.entity_id AS field_data_body_entity_id, field_data_body.etid AS field_data_body_etid, node.created AS node_created FROM {node} node LEFT OUTER JOIN {field_data_body} field_data_body ON node. = field_data_body.entity_id AND field_data_body.etid = :views_join_condition_0 WHERE (( (node.type IN (:db_condition_placeholder_1)) )) ORDER BY node_created DESC; Array ( [:db_condition_placeholder_1] => blog_post [:views_join_condition_0] => 1 ) in views_plugin_pager->execute_count_query() (line 134 of /Users/mark/Sites/marktrapp.com/sites/all/modules/views/plugins/views_plugin_pager.inc).

View export:

 $view = new view;
$view->name = 'blog';
$view->description = 'Blog';
$view->tag = '';
$view->view_php = '';
$view->base_table = 'node';
$view->is_cacheable = FALSE;
$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['exposed_form']['type'] = 'basic';
$handler->display->display_options['pager']['type'] = 'full';
$handler->display->display_options['style_plugin'] = 'default';
$handler->display->display_options['row_plugin'] = 'fields';
/* 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']['trim'] = 0;
$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']['hide_empty'] = 0;
$handler->display->display_options['fields']['title']['empty_zero'] = 0;
$handler->display->display_options['fields']['title']['link_to_node'] = 1;
/* Field: Fields: body */
$handler->display->display_options['fields']['entity_id']['id'] = 'entity_id';
$handler->display->display_options['fields']['entity_id']['table'] = 'field_data_body';
$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']['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']['hide_empty'] = 0;
$handler->display->display_options['fields']['entity_id']['empty_zero'] = 0;
/* 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: 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(
  'blog_post' => 'blog_post',

/* Display: Blog List */
$handler = $view->new_display('page', 'Blog List', 'blog');
$handler->display->display_options['path'] = 'blog';
dawehner’s picture

Sorry please open new issues: this has a total different reason: the fieldapi integration is not working fine

dawehner’s picture


Do you have the latest views and the latest core?

Mark Trapp’s picture

@dereine: yeah. I'll open a new issue with more detail. Apologies!

dawehner’s picture


Please update to the latest dev of drupal. Here your export works fine.

dawehner’s picture

Status: Active » Postponed (maintainer needs more info)

Update status

Mark Trapp’s picture


Per your request, I reopened my issue as #765144: PDOException: SQLSTATE[42000] and it was resolved. Doesn't look like the OP's original issue was resolved though, so I'll leave the status unchanged.

esmerel’s picture

Status: Postponed (maintainer needs more info) » Closed (won't fix)

No updates on original issue in more than 30 days.

ankit.professional’s picture

Category: bug » support
Priority: Normal » Critical
Status: Closed (won't fix) » Active

PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'blog_data.cache_views' doesn't exist: TRUNCATE {cache_views} ; Array ( ) in cache_clear_all() (line 163 of C:\wamp\www\drupal-7\includes\cache.inc).

I am getting this issue while creating "blog" content type.
I unchecked all publishing option and after clicking on Save Content type button i am getting this error.

hmartens@gmail.com’s picture

I've found that I get this and other PDO errors when my server is struggling under the strain either with memory or database that's too slow!

dawehner’s picture

Status: Active » Fixed

I am sorry but the issue mentioned in #11 is unrelated to the original issue.

@ankit.professional Maybe you forgot to run the update during install/updateing views.

dawehner’s picture

Priority: Critical » Normal


Status: Fixed » Closed (fixed)

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

Owen Barton’s picture

Issue summary: View changes
Status: Closed (fixed) » Closed (won't fix)