IRC logs for #farmOS, 2021-10-06 (GMT)

2021-10-05
2021-10-07
TimeNickMessage
[23:18:37]* kunigunde[m] has quit (Ping timeout: 265 seconds)
[23:18:37]* RevCornWallaceII has quit (Ping timeout: 265 seconds)
[23:18:37]* MatrixTravelerb4 has quit (Ping timeout: 265 seconds)
[23:19:06]* DanielAshcraft[m has quit (Ping timeout: 265 seconds)
[23:25:49]* MatrixTravelerb4 has joined #farmos
[23:35:02]* kunigunde[m] has joined #farmos
[23:35:12]* RevCornWallaceII has joined #farmos
[23:39:50]* DanielAshcraft[m has joined #farmos
[02:11:17]* farmBOT has joined #farmos
[11:29:35]<symbioquine[m]>Where does this validation occur in farmOS 1.x;
[11:29:49]<symbioquine[m]>ACTION uploaded an image: (6KiB) < https://libera.ems.host/_matrix/media/r0/download/matrix.org/KcUiwRHeocJ... >
[11:30:20]<mstenta[m]>ooh 1.x? really testing me here... :-)
[11:30:27]<symbioquine[m]>:)
[11:31:11]<mstenta[m]>geofield module
[11:31:46]<mstenta[m]>`grep -irn 'specified location data is invalid' profiles/farm/modules/contrib/geofield`
[11:32:22]<mstenta[m]>`function geofield_field_validate()`
[11:33:14]<mstenta[m]>https://git.drupalcode.org/project/geofield/-/blob/7.x-2.x/geofield.modu...
[11:34:55]<symbioquine[m]>I see it now...
[11:35:11]<symbioquine[m]>I was looking in the 7.x-1.x branch before and couldn't find it :(
[11:35:16]<symbioquine[m]>Thanks!
[12:21:44]<symbioquine[m]>I figured it out...
[12:21:45]<symbioquine[m]>The problem was that [this code](https://git.drupalcode.org/project/geofield/-/blob/1a84143568c7f56632156...) doesn't surface the actual geometry problem so if - for instance - you paste a rectangle that isn't closed because it only has 4 points specified rather than having the 5th, a user can't see the error about an unclosed polygon ring.
[12:22:07]<symbioquine[m]>I haven't figured out whether this will be a problem in 2.x yet...
[12:22:24]<mstenta[m]>Ah - I think something similar came up semi-recently...
[12:22:30]<mstenta[m]>Specifically regarding closed polygons
[12:23:01]<mstenta[m]>IIRC it was something to do with whether or not GEOS was installed
[12:23:02]<symbioquine[m]>Yeah, I think OpenLayers is okay with leaving off that last closing point.
[12:23:32]<mstenta[m]>With GEOS it would flag unclosed polygons... but without it it passed validation... maybe?
[12:26:01]<symbioquine[m]>ACTION uploaded an image: (25KiB) < https://libera.ems.host/_matrix/media/r0/download/matrix.org/RfvEQVSuELT... >
[12:26:10]<symbioquine[m]>That's in 2.x
[12:26:22]<mstenta[m]>w/ or w/o GEOS?
[12:26:30]<mstenta[m]>(if using the Docker image, then it has GEOS)
[12:28:44]<symbioquine[m]>Yeah, I'm using a recent 2.x-dev image
[12:30:32]<paul121[m]>this is something we contributed to geofield for 2.x: https://www.drupal.org/project/geofield/issues/3220860#comment-14150434
[12:30:57]<paul121[m]>just fwiw!
[12:35:01]<symbioquine[m]>It looks like the 2.x version of geofield is swallowing the exceptions somewhere...
[12:35:28]<symbioquine[m]>At least with the 1.x version it looked kinda trivial to surface the actual geometry error message.
[12:36:19]<paul121[m]>ohh I see. You want it to say "the polygon is not closed" - not just display the geom?
[13:05:46]<symbioquine[m]>Yeah 😄