simplemap
simplemap copied to clipboard
Creating new entries does not save the map coordinate record properly
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
- Create a new entry with a Maps field
- Save it
- Try to query for the new entry (in my case, I'm using an Element API endpoint)
- See the entry isn't there
- Resave the entry
- 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: