In geo_field.module on line 169, the code to populate $node->geo_fields is incorrect. $node->geo_fields in being overwritten with a fresh array each time this is run. This results in only the last geo_field to be processed being lsited in the array. Working correct code is:


      // Identify ourselves on the node level for RSS and other postprocessing.
      if (!$node->geo_fields){
        $node->geo_fields = array();
      }
      $node->geo_fields[] = $field['field_name'];
      return array($field['field_name'] => $ret, 'geo_fields' => $node->geo_fields);

CommentFileSizeAuthor
#3 444242_field_array.patch1.03 KBgreggles

Comments

phayes’s picture

Title: geo_feilds in node array not correctly created » geo_fields in node array not correctly created
phayes’s picture

Here's some cleaned up code:

      // Identify ourselves on the node level for RSS and other postprocessing.
      if (!$node->geo_fields){
        $node->geo_fields = array();
      }
      $node->geo_fields[] = $field['field_name'];
      return array($field['field_name'] => $ret);

Thanks for the great module!

greggles’s picture

Status: Active » Needs review
StatusFileSize
new1.03 KB

As a patch, with slight code style cleanup (space between ) and {).

I'm not sure this makes sense, but at least with a patch it's easier to review.

plopesc’s picture

It woks!!!
Thans a lot!!

allie micka’s picture

Status: Needs review » Fixed

Committed - thanks!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.