Skip Navigation

Maps cannot evaluate the distance difference if they are being compared through fields in connected posts

Resolved

Reported for: Toolset Maps 1.6

Resolved in: 2.0.2

Topic Tags: Toolset Maps

Symptoms

There is an issue where Toolset Maps cannot evaluate the distance difference if they are being compared through fields in connected posts.

This issue happens under following conditions:

  • You have two post types connected via one-to-one relationship.
  • Added a custom Address Field to both post types.
  • Populated the address in each connected post of each type.
  • Insert the toolset-maps-distance-value shortcode into one of the connected posts to compare a given location with the address of the connected post.
    This produces a shortcode similar to the following: 

The issue is that this shortcode will not display the distance from the given location to the location set in the related post. Instead, it will display the following error:
Warning: Invalid argument supplied for foreach() in .../toolset-maps/application/models/Shortcode/Distance/Value.php on line 27

Workaround

There is currently no workaround for this issue.

Our developers are aware of it and will fix it as soon as possible.

Comments are closed