Fix for arsing stupid taxonomy caching bollocks, wtf?!

  1.         // existing article, we only need to add category
  2.         $existing_story_node = node_load($result, NULL, TRUE);
  3.        
  4.         // prepare categories, loading existing taxonomy data first
  5.         $terms = $existing_story_node->taxonomy;
  6.        
  7.         // cycle through taxonomy data in document head
  8.         foreach ($xml_array['nitf']['head'] as $item) {
  9.           if ($item['NAME'] == 'category') {
  10.             // add new terms in to the array
  11.             $term = _driving_force_build_term($item['CONTENT']);
  12.             if ($term) {
  13.               $existing_story_node->taxonomy[$term->tid] = $term;
  14.             }
  15.           }
  16.         }
  17.        
  18.         krumo($existing_story_node->taxonomy);
  19.        
  20.         node_save($existing_story_node);
  21.        
  22.         $existing_story_node = node_load($result, NULL, TRUE);
  23.         krumo($existing_story_node);

Submit Fix

Any tags you'd like to associate with your code, delimitered by commas (example: Views, CCK, Module, etc).
Select the syntax highlighting mode to use.