Nothing returned from taxonomy_term_load function The --very normal-- taxonomy_term_load() doesn't seem to be able to load entities within a custom menu callback. Yet I can access a profile entity, load fields, and get the field tids, but I get nothing from the taxonomy load function!

function mymodule_menu() {
  $items = array();
  $items['user/account-convert'] = array(
    'title' =&gt; 'My Page',
    'page callback' =&gt; 'mymodule_page',
    'type' =&gt; MENU_NORMAL_ITEM,
  );
  return $items;
}

function mymodule_page() {
  global $user;
  $profile = profile2_load_by_user($user, 'my_profile_type');
  // Sanity check tid return. Success.
  echo $profile-&gt;field_profile_myfield[LANGUAGE_NONE][0]['tid'];
  // Term name returns nothing. The object just won't load.
  echo taxonomy_term_load($profile-&gt;field_profile_myfield[LANGUAGE_NONE][0]['tid'])-&gt;name;
}


This makes absolutely no sense.

I have even sanity checked outputting hard coded tid's like echo taxonomy_term_load(1708) after 100% confirming it's a valid tid value.

Additionally I followed the function tree up and tried calling taxonomy_term_load_multiple
 directly, and entity_load directly. All give me nothing.

Furthermore I can confirm the function is valid and available at that point with function_exists, and the lack of undefined function errors.
Probably, this is a Taxonomy Access issue.

See taxonomy_access_query_term_access_alter().

(For the rest of the Internet, I only know this is the issue because Josh and I are working on the same codebase and I ran into the exact same issue in a completely different context.)