simplemap icon indicating copy to clipboard operation
simplemap copied to clipboard

Creating new entries does not save the map coordinate record properly

Open Mosnar opened this issue 5 years ago • 0 comments

Description

If I create a new Entry with some coordinates, the entry will save and the map will appear to be correct; however, the new entry will not appear in any geographic distance query results. Upon inspecting the table, we can see that the map record is not saved to the correct owner element ID, it's only saved to the original draft of the entry. Upon resaving the entry, this is corrected and the entry appears in the results as expected.

Steps to reproduce

  1. Create a new entry with a Maps field
  2. Save it
  3. Try to query for the new entry (in my case, I'm using an Element API endpoint)
  4. See the entry isn't there
  5. Resave the entry
  6. See the entry now shows up as expected

Additional info

  • Craft version: 3.4.15
  • Maps version: 3.8.3
  • PHP version: 7.3.x
  • Database driver & version: MySQL 5.7
  • Other Plugins:

Mosnar avatar Apr 15 '20 13:04 Mosnar