I noticed some weird addresses getting into the location table. I made a couple of updates to the pirets.batch.inc file that may help.

Looks like the location array was getting initialized to the wrong name. This could cause some stray data for subsequent updates:

      // Now edit the node.
-      $loc_data = array(
+      $loc = array(
        'street' => array(),
      );

I was getting addresses like "Street 123 Maple" instead of "123 Maple Street". Looks like the various street correlation fields needed to be key sorted first, so that street 1 is first, street 2, etc.

        if (count($loc['street'])) {
+        // key sort the elements prior to implode (street address 1 before street address 2)
+        ksort($loc['street']);
          $node->pirets_loc[0]['street'] = implode(' ', $loc['street']);
        }

Comments

amysteen’s picture

Thanks for posting, this worked for me using 6.x-3.x-dev.

Garrett Albright’s picture

Status: Active » Needs review

Changes implemented. Might not be in CVS soon, but should be in the Bitbucket repository soon. Thanks, scott.