created customtest.tpl.php and inside there is

  print custompage_node_tile(8, $type = '', $teaser_only = FALSE );

node number 8 exists and works normally when you enter /node/8
when going to my /customtest page you see
Fatal error: Call to undefined function db_result() in [...]/sites/all/modules/custompage/custompage_util.inc on line 90

Comments

danmcewan’s picture

Assigned: Unassigned » danmcewan
emackn’s picture

db_rewrite_sql also needs attention. it was replaced with hook_query_alter,
http://drupal.org/update/modules/6/7#db_rewrite_sql

I think lines 89-90:

  $sql = 'SELECT n.nid FROM {node} n WHERE n.tnid = %d and n.language = \'%s\' ';
  $i18n_nid = db_result(db_query(db_rewrite_sql($sql), $node->nid, $langcode)); //defaults should be in default language

need to become

 $query = db_select('node', 'n');
 $query->fields('n', array('nid'));
 $and = db_and()->
    condition('tnid', $node->nid)->
    condition('language', $langcode);
 $query->condition($and);
 $i18n_nid = $query->execute()->fetchField();
danmcewan’s picture

Status: Active » Fixed

Fixed that and problems with the node_load syntax which were also contributing. This has now been released as part of alpha3.

danmcewan’s picture

Status: Fixed » Closed (fixed)