< 312022-04-01⋎02 >

Topic for #farmOS is: farmOS (farmos.org) is a free and open source, web-based farm management system. User guide: farmos.org/guide/ - Forum: farmOS.discourse.groupSet by mstenta on 2021-06-15 at 12:52
06:59*farmBOT has joined
16:00paul121[m]TIL that Drupal provides a JS function for building URL paths. We should use this!... (full message at libera.ems.host/_matrix/media/r0/downloa)
16:00mstenta[m]Oh!
16:00paul121[m]There are a few spots we build a url and I don't think we use the `drupalSettings.path.pathPrefix`
16:01mstenta[m]True! Historically we've had a few bugs related to install farmOS in a sub directory, generally related to this
16:02paul121[m]Also came across this cool site - documentation for the Drupal JS functions/behaviors: drupaljs.net/Drupal.html#.url
16:02mstenta[m]Oh wow!
16:03symbioquine[m]paul121[m]: Examples?
16:04paul121[m]this is the first that comes to mind - probably not too many:github.com/farmOS/farmOS/blob/11cc36accf
16:13mstenta[m]could probably grep for `drupalSettings.path.baseUrl`
16:14symbioquine[m]Won't `drupalSettings.path.baseUrl` include the path prefix?
16:27symbioquine[m]The docs on drupal.org seem pretty useless in that regard...
16:27symbioquine[m]You'd think a page like www.drupal.org/docs/drupal-apis/javascri would say, "Here's the 'core' JS libraries we provide and a description of what properties/methods are included"
16:28symbioquine[m]It seems like if I want "first-party" documentation for that stuff, my only option is the source code.
16:30mstenta[m]symbioquine: that's what the "Edit" button is for ;-)
16:30mstenta[m](i agree - docs leave a lot to be desired)
16:30paul121[m]yea agreed... I'm not sure if drupaljs.net is official
17:26FarmerEd[m]Can I not use PATCH on an animal asset with the API?
17:26FarmerEd[m]I'm getting:
17:26FarmerEd[m] "No route found for "PATCH /api/asset/animal": Method Not Allowed (Allow: POST, GET, HEAD)"
17:27symbioquine[m]It's POST to create an asset
17:27symbioquine[m]PATCH would be for modifying one
17:28symbioquine[m]e.g. `v2.farmos.test:8080/api/asset/animal/b7d`
17:29FarmerEd[m]I want to modify. I'm working on a Node Red flow to sync with Department of Ag database, so want to archive animals that exist in my farmOS database but not the Departments.
17:29symbioquine[m]www.drupal.org/docs/core-modules-and-the
17:30mstenta[m]Modifications must be made to the specific UUID path
17:30FarmerEd[m]never mind I see I'm an idiot
19:19*uploaded an image: (39KiB) < libera.ems.host/_matrix/media/r0/downloa >
19:19tool172[m]so i had to rebulid my docker image and cleared out the volumes
19:19tool172[m]but now i'm confused why i'm seeing permission issues
19:20tool172[m]i copied the settings addition to the settings.php file for uploads
19:20mstenta[m]Do not use Drupal's built in updater!
19:20tool172[m]i'm not
19:20tool172[m]i'm uploading the tar.gz
19:20mstenta[m](if that's what you're doing)
19:20tool172[m]for google maps
19:20mstenta[m]Oh ok haha
19:20tool172[m]i might go wipe the volumes...again
19:21mstenta[m]Oh just download the module tarball and unpack it in sites/all/modules
19:21mstenta[m]I've never used Drupal ui to download modules, so I can't vouch for it in this or any context
19:22mstenta[m]I'm sure it works fine but it's also a security concern to let drupal write code IMO
19:22mstenta[m]If everything else is working I wouldn't wipe volumes
19:22mstenta[m]Try downloading it manually
19:23mstenta[m]> i'm uploading the tar.gz
19:23mstenta[m]Oh sorry just saw this
19:23mstenta[m](on my phone right now) :-)
19:24mstenta[m]If you are uploading tarball then you don't need to use whatever UI you screenshotted above
19:24mstenta[m]Just unpack it and go to /admin/modules to enable
19:24tool172[m]i just did it manually
19:24tool172[m]just wondering what else will be off
19:25tool172[m]had a bad gateway at timeout for using nginx proxy manager
19:25tool172[m]during install
19:25tool172[m]so that's down right now
19:25mstenta[m]> just wondering what else will be off
19:25mstenta[m]In regards to what?
19:25mstenta[m]Did the module install ok?
19:27mstenta[m]I'm just responding to your original screenshot and the fact you mentioned Google maps
19:27mstenta[m](one thing at a time) :-)
19:28tool172[m]i manually unpacked it
19:28tool172[m]and it installed ok
19:28tool172[m]just wondering if something is aloof
19:28mstenta[m]Great
19:28tool172[m]now that it's all setup i'm going to re-proxy it
19:30mstenta[m]Don't worry about the error in your screenshot. That UI shouldn't be used to install/update modules either way. It probably isn't working because of file permissions but that's a good thing IMO for security reasons
19:30tool172[m]it isnt
19:30tool172[m]i just was wondering if a lot of that is limited in the docker configs
19:30tool172[m]i just through standard configs for now
19:30tool172[m]i'll manually migrate my db info
19:30mstenta[m]Gotcha yea probably
19:31mstenta[m]I gotta run.. back later
19:31tool172[m]later. I'm moving from standalone to docker so we shall see
19:32tool172[m]Farmer Ed if you have info on how your connecting with an extended module to Dept of AG id be interested. I want to develop a module to list sale barns in area with pricing for a label (IE stockers/hiefers/etc ) with moving averages to make informed decisions with data spanning 2 years.
19:33tool172[m]I kept trying to understand the scripting for REST but my brain was fried
19:33tool172[m]Plus stockyard data is of use to ranchers all the time :)
19:34FarmerEd[m]It's Department of Ag DAFM in Ireland?
19:45tool172[m]i'm in US
19:45tool172[m]but they have a rest api you can register for here
19:52FarmerEd[m]It's probably not vastly different.
19:52FarmerEd[m]I'm working on syncing my herd data with the Irish Cattle Breeders Federation (which in turn is connected with our Department of Ag).
19:52FarmerEd[m]I'm using Node Red and will be posting everything to Github.
19:52FarmerEd[m]Have you managed to do anything with the API at all yet?

< 312022-04-01⋏02 >