Closed (fixed)
Project:
Geolocation Address Link
Version:
8.x-1.x-dev
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
13 Mar 2018 at 17:20 UTC
Updated:
15 Dec 2019 at 16:59 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
thegentleman commentedI'm on the previous version of Drupal, have an issue with Webforms, so I haven't updated yet to 8.5.0
However, I'm running into a similar issue where it won't even save. I get back a pretty big PHP Error. I can't create anything new.
Comment #3
marc.groth commentedI can confirm that I have the same issue. Stats as follows:
Drupal: 8.5.5
Address: 8.x-1.4
Geolocation: 8.x-1.11
Geolocation Address Link: 8.x-1.1
In my case the lat/lng values are updated however the cos/sin/rad values are not. It seems that those values are only updated upon saving the content a second time. This is because
geolocation_address_link_entity_presave()doesn't get to$entity->set($geolocation_field, $values);which effectively wipes out these values (presumably because it only explicitly sets the lat/lng/data values).Attached is a patch that explicitly sets the cos/sin/rad values so that these are not lost. It also ensures that these values are set the first time the content is saved. They are meant to be set by
GeolocationItem::preSave()(in the geolocation module) but that function is not called upon the first save for some reason. That may be part of the problem.Comment #4
marc.groth commentedComment #5
andres.torres commentedOn a Drupal 8.6.x install the issue is still present, address link won't generate the LAT/LONG values upon node save or edit.
Comment #6
karens commentedThe issue #2975883: Fatal Error when creating content - With Address 8.x.1.4 may be a factor here, I just committed a fix for that. Can you confirm if you still have a problem when using the latest dev code?
Comment #7
andres.torres commentedIs still an issue, tested on a fresh Drupal install with latest geolocation + geolocation address link with patch.
Comment #8
neelaj82 commentedI can confirm to this as well. I had successfully wasted hours debugging why my proximity filter was not working and I started looking at the database and noticed that the cos and sin column were empty. It would save if I saved the node twice but not at the first time. This patch worked for me and the node was getting saved with the cos and sin values at the first time.
Comment #9
haasontwerp commentedI can confirm this as well using Drupal 8.6.10, and adress field 1.4. Applied this patch: https://www.drupal.org/project/address/issues/2975881 and the patch attached to this issue. Latitude and Longitude are not being saved.
Comment #10
haasontwerp commentedComment #12
karens commentedMakes sense, thanks!