< 132021-12-14⋎15 >

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
00:06mstenta[m]ooh good point paul121... yea maybe file system needs to be configured
00:07mstenta[m]sgoodall: where are you trying to upload them? what is the URL/path? there are a few different places where KMLs can be uploaded, so knowing which one you're trying would help us help you debug :-)
13:19*qoyyuum[m] has joined
13:19qoyyuum[m]Hey all
13:20qoyyuum[m]I'm currently using Farmier and was wondering if it has API endpoints exposed? I'm a noob at this so apologies in advance.
13:21mstenta[m]Hi qoyyuum yes API endpoints work on Farmier :-)
13:21mstenta[m]Note that Farmier only hosts 1.x instances currently, but will be offering 2.x in the near future
13:21qoyyuum[m]Wonderful! Now I'm not sure if the API docs on farmOS.org are showing for v1 or v2
13:24mstenta[m]farmOS.org is 1.x
13:24mstenta[m]docs.farmOS.org is 2.x
13:25mstenta[m]but we will be "flipping the switch" once the first beta release of 2.x is ready (soon)
13:25qoyyuum[m]How soon? Like new years soon?
13:25mstenta[m]the 2.x API docs are a bit sparse - but that's largely because a lot of it is generally documented here: www.drupal.org/docs/core-modules-and-the
13:26qoyyuum[m]I see
13:26mstenta[m]somewhere around there - no guarantees - we have a few remaining open issues and some other stuff to get done before then - working around holidays etc :-)
13:27qoyyuum[m]That's fine then. I'm working on an improved Field Kit and since Farmier is on 1.x, I might just give that a go.
13:28mstenta[m]Oh cool - are you coordinating with jgaehring at all? He is working on version 2 of Field Kit as well
13:28qoyyuum[m]Not yet. Currently refactoring the Field Kit into a new framework for the moment.
13:31mstenta[m]Oh I see - do you plan to contribute changes back? Or fork the project? If contributing back then definitely coordinate with jgaehring - otherwise no guarantees it will be merged
13:31mstenta[m]I know a lot has been changing ahead of 2.x
13:31qoyyuum[m]I see. Sure I'll contact him soon
13:32mstenta[m]Great! Contributions are always welcome!
13:46jgaehring[m]Yea, looking forward to chatting!
17:29*sgoodall_ has joined
17:38*aislinnpearson[m has joined
20:34SimonGoodall[m]<mstenta[m]> "sgoodall @jsgoodall:matrix.org..." <- It imports it correctly if I copy paste it into the text box, also generated by QGIS so doubt that this is the issue. Just need to understand where the file normally gets saved in the drupal/farmos context so that I can look at permissions and which log I should be looking at for errors, this way I can figure it out. Will research more.
20:42SimonGoodall[m]<mstenta[m]> "sgoodall: where are you trying..." <- /asset/1/edit I have tried it here with the same result and under /asset/add as well
20:50SimonGoodall[m]core/modules/file/src/Plugin/Field/FieldWidget/FileWidget.php: $elements['#file_upload_title'] = t('Add a new file');
20:50SimonGoodall[m]I believe I found where to start looking
20:52mstenta[m]sgoodall: can you confirm that you have the "Private file system path" configured here: /admin/config/media/file-system
20:53mstenta[m]s/sgoodall: can you confirm that you have the "Private file system path" configured here: /admin/config/media/file-system/sgoodall: can you confirm that you have the "Private file system path" configured here: `/admin/config/media/file-system` (add that path to the end of your farmOS hostname)/
20:53mstenta[m]it looks like we need to add that to the hosting docs
20:54mstenta[m]we do have it in the dev environment docs here: docs.farmos.org/development/environment/
20:54SimonGoodall[m]mstenta[m]: Quite right, it is not set, thanks!
20:54mstenta[m]Oh good! That is most likely the problem
20:54mstenta[m]I will add that to our hosting docs right now :-)
21:07mstenta[m]docs.farmos.org/hosting/install/#file-up
22:09SimonGoodall[m]A couple more steps were needed to make it work apart from adding "$settings['file_private_path'] = '/opt/drupal/web/sites/default/files/private';" to the settings.php. Used the www.drupal.org/docs/8/core/modules/file/ document to find it out. You need to create the sites/default/files/private directory and add the .htaccess with "Deny from all", then I also had to clean the cache. Working now. Thanks for the help!
22:09mstenta[m]Oh ok glad you got it working!
22:10mstenta[m]I *think* Drupal will create the directory and .htaccess automatically if `sites/default` is writable by Apache
22:11mstenta[m]Might be worth testing and updating docs accordingly
22:12SimonGoodall[m]I would know that if I would of cleared the cache before adding this line to the settings.php, but I did this after so not sure about this now.
23:07SimonGoodall[m](2.0.0-alpha5) Funny how it is reading a kml file without actually dividing it into its individual polygons which in this case are the fields, it ends up all as a single asset. When I had tried it out in 1.x it had actually worked correctly ( I actually remember swearing to myself because I had not named all the fields/paddocks before importing and ended up doing this manually with the missing ones :)
23:20paul121[m]ohh sgoodall you have been uploading this kml to a single asset, correct? Either `/asset/1/edit` or `/asset/add` ?
23:20SimonGoodall[m]yep
23:20paul121[m]To create multiple assets you need to import it using the "KML importer" at `/import`
23:22SimonGoodall[m]uh..oh... thanks!!! Working like a charm
23:23*feels dumb
23:23paul121[m]haha no, not at all
23:23paul121[m]we need to make that more visible
23:23paul121[m]I've also just discovered a bug with that on the latest `2.x-dev` so... thanks! :P
23:25paul121[m]when uploading a KML file to `/asset/1/edit` we call that "Populating the geometry from a file" and will only update the single asset. Importing is the larger process of creating assets. Really appreciate any feedback you have on these processes!
23:26paul121[m]And glad that you are testing them out! It's hard to test everyones KML files ourselves... so I'm glad it is working
23:28SimonGoodall[m]Me too... I was not really looking forward to rebuilding the polygons again.
23:28SimonGoodall[m]Will keep you posted
23:30SimonGoodall[m]Yes, maybe more clarity in the form with a non ambigious title will help. Like "Import single asset"
23:33paul121[m]yeah, just realizing the button is called "Import geometry from uploaded files". Maybe "import" is confusing in this context..
23:33*uploaded an image: (18KiB) < libera.ems.host/_matrix/media/r0/downloa >
23:34SimonGoodall[m]I think Import is correct because it is transforming a kml into an asset.
23:35paul121[m]maybe "Copy geometry from uploaded files" - we might be able to add a description below the button to the effect of "This will copy the geometry from uploaded files to this single asset. To import the geometry for multiple assets use the importer (link)"
23:35SimonGoodall[m]paul121[m]: description is a good idea. Saves on documentation
23:36paul121[m]well in this context it will only copy the geometry out of the KML. It won't use any of the other KML attributes
23:38paul121[m]sgoodall: are you a developer? Or only hosting farmOS right now? I think this would be a simple change if you're interested in opening a pull request :-)
23:40SimonGoodall[m]Yep, I'm a tinkerer and a developer, if you guide me through the process once ( or guide me to the documentation for it ) I will be able to do the right thing because I have never worked in a team before.
23:42paul121[m]Cool! Are you familiar with version control using git or github?
23:43paul121[m]Here is the relevant code: github.com/farmOS/farmOS/blob/1f8941aff9
23:43paul121[m]I think we just need to change the `#title` property, and maybe add a `#description`
23:43SimonGoodall[m]I'm using git but not in parallel with other people.
23:45paul121[m]I think you said you were using the production docker-compose file? If so it might be hard to make this change and see it locally
23:45paul121[m]You could try setting up a development docker-compose environment
23:47paul121[m]But this is fairly simple so you may be able to just do `git clone github.com/farmOS/farmOS.git` to get the source code and make changes
23:49paul121[m]Once you have some changes, you could push them to your own fork of farmOS on github, and make a pull request. Some docs on that here: docs.github.com/en/pull-requests/collabo
23:50paul121[m](may be able to make changes in the Github UI even)
23:51SimonGoodall[m]paul121: great, I will look into this tomorrow with more time, I'll set up a dev environment on my local network
23:51SimonGoodall[m]where should I be when I do the git clone request?
23:51SimonGoodall[m]which directory
23:52paul121[m]Ah, if you follow the instructions for the docker-compose development environment the repository will actually be cloned for you!
23:52paul121[m]You would just need to add your github fork as a "remote". That is where you would push up your changes
23:52SimonGoodall[m]ok, perfect, let me read up on it, I have already taken up enough of your time already :)
23:53paul121[m]the git repo will be in `www/web/profiles/farm`
23:53paul121[m]no problem!

< 132021-12-14⋏15 >