I am programatically saving nodes, and everything is working fine. Pathauto is working correctly as well and generating aliases based on my url alias configurations.
However, when Views creates a list of the new nodes, it uses node/xx instead of the existing url alias. Anyone know why this could be happening? All caches have been cleared, cron ran, etc. Here is the code
$node = new stdClass();
//set other defaults
node_object_prepare($node);
$node->type = $page_data['content_type'];
$node->body[LANGUAGE_NONE][0]['value'] = $page_data['description'];
$node->body[LANGUAGE_NONE][0]['summary'] = text_summary($page_data['description']);
$node->body[LANGUAGE_NONE][0]['format'] = 'filtered_html';
$node->title = $page_data['title'];
$node->field_product_price[LANGUAGE_NONE][0]['value'] = $page_data['price'];
$node->field_item_location[LANGUAGE_NONE][0]['postal_code'] = $page_data['zipcode'];
$node->uid = "1";
$node->status = 1;
$node->active = 1;
$node->pathauto_perform_alias = TRUE;
$node->field_product_images[LANGUAGE_NONE] = $images;
unset($images);
$node->field_baby_clothes_category[LANGUAGE_NONE][0]['tid'] = $page_data['category'];
if($node = node_submit($node)) { // Prepare node for saving
node_save($node);
}
note - when I add the same information through the content type form everthing works fine. It's almost as if my code is missing something that helps connect it to views.