I discovered a bug when importing a nodereference that didn't had a value set, or the value was zero. Node import would look for a title, and if having a node's title blank it would wrongly output that node's id.
this piece of code in supported/cck/content.inc line 126

          case 'nodereference':
              // If $value is numeric use it
              if (intval($value) > 0) {
                $value = intval($value);
              } // otherwise find a node title that matches and get nid.
              else {
                $referenced_nodes = array();
                $sql = "SELECT nid, title FROM {node} WHERE title SOUNDS LIKE '%s'";
                $result = db_query($sql, $value);
                $record_found = db_fetch_object($result);
                if ($record_found) {
                  $value = $record_found->nid;
                }
              }
              break;

should be changed to something like this:

           case 'nodereference':
              // If $value is numeric use it
              if (intval($value) > 0) {
                $value = intval($value);
              } // otherwise find a node title that matches and get nid.
              else if ( $value != '' && $value != 0 ) {
                $referenced_nodes = array();
                $sql = "SELECT nid, title FROM {node} WHERE title SOUNDS LIKE '%s'";
                $result = db_query($sql, $value);
                $record_found = db_fetch_object($result);
                if ($record_found) {
                  $value = $record_found->nid;
                }
              }
              break;

Comments

Robrecht Jacques’s picture

Status: Needs work » Closed (duplicate)

Correct. This has been fixed already. Eg try 5.x-1.7 or 5.x-1.8 which will be released later this weekend.

Setting it to duplicate.