theme_preprocess_node not working inside of a view
$node = menu_get_object() works only when the page you are seeing has a URL that is similar to node/12, or node/12/view. When you are watching a view, its URL is probably different.

That code is also not necessary, as template_preprocess_node() already initializes $variables['node'] with the node object.

$variables['node'] = $variables['elements']['#node'];
$node = $variables['node'];


If you want to check if the node is being viewed in its own page, you can use the following code.

if ($variables['page']) {
  // The node is shown in its own page.
}
else {
  // The node is shown together other nodes.
}


$variable['page'] is a variable set by template_preprocess_node().

As side note, this is the code used by views_plugin_row_node_view::render() to render a node.

function render($row) {
  if (isset($this-&gt;nodes[$row-&gt;{$this-&gt;field_alias}])) {
    $node = $this-&gt;nodes[$row-&gt;{$this-&gt;field_alias}];
    $node-&gt;view = $this-&gt;view;
    $build = node_view($node, $this-&gt;options['view_mode']);

    return drupal_render($build);
  }
}


node_view() is the function that calls the theme_node() theme function, causing preprocess/process functions to be called.