[20:49:45] | <nzsnowman[m]> | hello. |
[20:51:20] | <nzsnowman[m]> | Anyone here ?? |
[20:51:20] | <nzsnowman[m]> | I'm trying to install a Mapbox API key to point to a custom Mapbox image.. but nothing I do seems to affect the visual... |
[20:51:58] | <nzsnowman[m]> | is there some other setting I need in get the mapbox object to load my data ? |
[21:47:51] | <symbioquine[m]> | I'm not sure I understand... what is a "custom Mapbox image"? Is this a custom self-hosted instance of the Mapbox server or custom imagery hosted on Mapbox's servers? |
[04:50:17] | * farmBOT has joined #farmos |
[07:19:47] | <mstenta[m]> | > Interesting regression that we picked up at some point in the 2.x releases of farmOS (early versions worked, but I'm just finding my farmOS_wfs tests to be broken due to this now): https://www.drupal.org/project/drupal/issues/3048621 |
[07:19:47] | <mstenta[m]> | symbioquine: Huh that's interesting. The issue was opened in April 2019 - before we started the 2.x branch 🤔 Are you sure it wasn't always an issue? Or maybe something else changed? |
[07:25:35] | <mstenta[m]> | nzsnowman: I see you posted on the forum as well (https://farmos.discourse.group/t/plesk-docker-farmos/1375) - I'll respond there. :-) |
[07:47:02] | * ircwaves[m] has joined #farmos |
[09:17:06] | <symbioquine[m]> | > <@mstenta:matrix.org> > Interesting regression that we picked up at some point in the 2.x releases of farmOS (early versions worked, but I'm just finding my farmOS_wfs tests to be broken due to this now): https://www.drupal.org/project/drupal/issues/3048621 |
[09:17:06] | <symbioquine[m]> | > |
[09:17:06] | <symbioquine[m]> | > symbioquine: Huh that's interesting. The issue was opened in April 2019 - before we started the 2.x branch 🤔 Are you sure it wasn't always an issue? Or maybe something else changed? |
[09:17:06] | <symbioquine[m]> | Yeah, I'm not totally sure of the cause... just that the tests worked [8 months ago](https://github.com/symbioquine/farmOS_wfs/actions/runs/1863279478) against the 2.x-dev image at the time - implying that either JSON:API wasn't returning that `resourceVersion` or wasn't rejecting deletes requests that included it. |
[09:20:31] | <mstenta[m]> | Very strange. Well the big change might be the update to Drupal 9.4.x, but I'm not sure within that what might have caused this issue. |
[09:21:49] | <symbioquine[m]> | Yeah |
[09:22:09] | <symbioquine[m]> | Somewhat academic I guess, just thought I'd share |
[13:56:43] | * lauriewayne[m] has joined #farmos |
[13:58:00] | <lauriewayne[m]> | Hi friends, just wandering by and eavesdropping a little as we think about an Open Food Network/OpenTEAM collaboration! 👋 🌊 |
[13:58:22] | <lauriewayne[m]> | s/OpenTEAM/FarmOS/ |
[15:22:59] | <mstenta[m]> | Welcome lauriewayne !! |
[15:23:01] | <mstenta[m]> | symbioquine: https://www.drupal.org/project/drupal/issues/3045509#comment-14726416 |
[15:28:58] | <mstenta[m]> | paul121: quick question... do you know if there was a reason we defined the `equipment` and `quick` fields as "bundle" fields instead of "base" fields? They get applied to all bundles, so it seems like they could be base fields. And if I change them to base fields locally, everything seems to continue functioning properly (still need to run tests to confirm). |
[15:29:11] | <mstenta[m]> | I'm leaning towards making them base fields, if that doesn't cause any issues. |
[15:29:37] | <mstenta[m]> | The issue linked above is the motivation. Currently you can't write to those fields via the API. |
[15:30:23] | <mstenta[m]> | https://github.com/farmOS/farmOS/blob/7694b2cbd3ee02884ddceba3f8e0bae5e6... |
[15:30:34] | <mstenta[m]> | https://github.com/farmOS/farmOS/blob/7694b2cbd3ee02884ddceba3f8e0bae5e6... |
[15:31:09] | <mstenta[m]> | I think I added both of those fields originally... and I can't think of any reason why they needed to be bundle fields 😅 🤷 |
[15:32:15] | <mstenta[m]> | The only thing that came to mind was: using bundle fields ensures that a separate table gets used for the field data, rather than adding a column to the entity field data table... but that also happens for multi-value fields, which these are... so that wouldn't make a difference |
[15:32:52] | <mstenta[m]> | I'll try running the tests on them as base fields now to see what happens... |
[15:57:42] | <mstenta[m]> | FYI symbioquine I have working install/uninstall hooks, it seems... I'm just stuck trying to get automated tests working for them, but I think it's more of a testing issue than an issue with the hooks |
[15:58:16] | <mstenta[m]> | If you're curious to test them I can paste the code. (Did you end up updating to Drupal 9.4.7?) |
[15:58:20] | <mstenta[m]> | I still have to write the update hook side of things... |
[15:58:28] | <mstenta[m]> | I'm also still weighing whether or not to just try patching Drupal core... |
[16:05:11] | <symbioquine[m]> | <mstenta[m]> "If you're curious to test them I..." <- Yeah, I got both my dev and production environments onto beta 7 :) |
[16:40:56] | <mstenta[m]> | > I'll try running the tests on them as base fields now to see what happens... |
[16:40:56] | <mstenta[m]> | Tests pass with `equipment` and `quick` converted to base fields. |
[17:23:17] | <symbioquine[m]> | <mstenta[m]> "If you're curious to test them I..." <- I think I'd just retest with the `farm_quick` field since that's easier than uninstalling/reinstalling my custom modules - and should be representative of how they'd behave anyway. |
[17:37:35] | <symbioquine[m]> | Any idea how to get Drupal to set `drupalSettings.path` in response to an ajax request? |
[17:38:03] | <symbioquine[m]> | Seems like these lines should be doing it; https://github.com/drupal/drupal/blob/eef69b0281fdbd25ac6ed37fee6da59a44... |
[17:38:47] | <symbioquine[m]> | but those settings aren't included in the ajax `settings` command that comes back... even when I explicitly put `core/drupalSettings` in the attached libraries. |
[17:42:55] | <mstenta[m]> | Hmm are any drupalSettings available? Is it just the path thats missing? |
[17:43:00] | <symbioquine[m]> | Yeah, it's returning pretty much all the rest |
[17:43:24] | <mstenta[m]> | You can also declare core/drupalSettings as a dependency of your library FYI |
[17:44:08] | <symbioquine[m]> | ACTION uploaded an image: (66KiB) < https://libera.ems.host/_matrix/media/r0/download/matrix.org/LbtirwUVhdz... > |
[17:44:43] | <mstenta[m]> | Hmm... so... what path do you need exactly? |
[17:45:40] | <mstenta[m]> | And when you say "ajax request" do you mean Drupal Form API #ajax? |
[17:45:40] | <mstenta[m]> | Or something else/custom? |
[17:46:10] | <symbioquine[m]> | mstenta[m]: It's not so much that I need it, but the `asset_type_layers` behaviour does; https://github.com/farmOS/farmOS/blob/616261498d87103eba3651254ac25f9f4c... |
[17:46:40] | <symbioquine[m]> | mstenta[m]: e.g. something like this;... (full message at <https://libera.ems.host/_matrix/media/r0/download/libera.chat/07e916e2a4...) |
[17:47:39] | <symbioquine[m]> | Then loading that from a non-Drupal page and manually bootstrapping the Drupal Ajax commands to inject the `drupalSettings` and map dependencies. |
[17:48:23] | <symbioquine[m]> | If it were a Drupal page, then `drupalSettings.path` would have already been set as part of the original page request. |
[17:48:40] | <symbioquine[m]> | But since it's not, I'm hoping Drupal can return that data to me as part of the Ajax request itself. |
[17:50:41] | <symbioquine[m]> | I fear it may be a completely unsupported use-case for the Drupal Ajax system, but short of an IFrame, I don't see any other way to load the farmOS map such that it would honor behaviours added via contrib modules |
[17:54:04] | <nzsnowman[m]> | <mstenta[m]> "nzsnowman: I see you posted on..." <- Thanks, man. |
[17:54:05] | <nzsnowman[m]> | I feel that with our time zone differences, we're never gonna be chatting at the same time. |
[17:54:05] | <nzsnowman[m]> | Are there any support people in the Southern Hemisphere ? |
[17:59:54] | <symbioquine[m]> | Pretty much all the support is on a volunteer basis so the timing is at the discretion of the folks providing it. The exceptions to that (in my understanding) are paying customers of Farmier or case-by-case contract support work. |
[18:01:09] | <symbioquine[m]> | We do have a Jobs board where you could request paid support: https://farmos.discourse.group/c/jobs/9 |
[18:01:28] | <nzsnowman[m]> | <symbioquine[m]> "I'm not sure I understand..." <- Okay. |
[18:01:28] | <nzsnowman[m]> | This is my Mapbox style: https://api.mapbox.com/styles/v1/nzsnowman/cl921ckbh000114mo3mj5gsge.htm... |
[18:01:28] | <nzsnowman[m]> | It is just me playing around to try and get this style into farmOS. The geolocation is correct, but there is no styling. |
[18:01:28] | <nzsnowman[m]> | My dev has the real version which is the standard satellite image with our AutoCAD plan overlaid. We were hoping that using our key in the farmOS settings would load our style. But it seems the .js isn't designed to do all that. Yet. |
[18:06:57] | <symbioquine[m]> | Based on what I saw in the browser console when I loaded that page, I think you might be able to try something like this in your custom farmOS-map behavior (see my reply on the forum)...... (full message at <https://libera.ems.host/_matrix/media/r0/download/libera.chat/67a5d3a9dc...) |
[18:07:49] | <symbioquine[m]> | I don't know what that `sku` parameter is though so you'd want to understand that to know whether it's likely to change in a way that would break access to the tile data. |
[18:08:24] | <symbioquine[m]> | Also important would be double-checking that the x/y/z parameters are in the same order and the same kind of values. |
[18:08:41] | <symbioquine[m]> | I expect you can find those answers somewhere in the Mapbox documentation. |
[18:10:05] | <symbioquine[m]> | * Also important would be double-checking that the `z/x/y` parameters are in the same order and the same kind of values. |
[18:15:30] | <symbioquine[m]> | See also https://openlayers.org/en/v6.15.1/examples/mapbox-vector-tiles-advanced.... |
[18:15:56] | <symbioquine[m]> | The url they're using in that example is much more similar to the one you're probably wanting to use. |
[18:21:40] | <symbioquine[m]> | Actually, it looks like those tile layers are "vector tiles", which I suspect are different than the normal XYZ Tile layers we support in farmOS-map: https://github.com/farmOS/farmOS-map/blob/ae0326f925ac0a39d697c8a423b699... |
[18:23:00] | <symbioquine[m]> | Probably worth testing with the code I roughed out above, but don't be surprised if it doesn't work. I suspect that kind of layer would need a change to farmOS-map to add support for xyz vector tiles. |
[18:51:24] | <mstenta[m]> | > I'll try running the tests on them as base fields now to see what happens... |
[18:51:24] | <mstenta[m]> | Tests are passing for `equipment` and `quick` base fields (with minor tweaks to tests) |
[18:53:02] | <mstenta[m]> | symbioquine: maybe we can take a look at the JS stuff on the weekly dev call |
[18:53:28] | <mstenta[m]> | I think my brain is too distracted with other tests/debugging to fully wrap my head around it :-) |
[18:55:17] | <symbioquine[m]> | Yeah, no worries 🫠|