# KML import in 2.x

**URL:** <https://farmos.discourse.group/t/kml-import-in-2-x/1108>\
**Category:** Hosting farmOS\
**Tags:** support-request\
**Created:** [February 3, 2022, 8:51am UTC](https://farmos.discourse.group/t/kml-import-in-2-x/1108 "2022-02-03T08:51:53Z")\
**Posts on this page:** 9\
**Page:** 2

<div class="post-metadata">

**Author:** ![mstenta](https://yyz2.discourse-cdn.com/free1/user_avatar/farmos.discourse.group/mstenta/32/4_2.png) [@mstenta](https://farmos.discourse.group/u/mstenta)\
**Post date:** [February 14, 2022, 3:15pm UTC](https://farmos.discourse.group/t/kml-import-in-2-x/1108/21 "2022-02-14T15:15:51Z")

</div>

> [@mstenta](#):
>
> I’m not sure why Plant Type uploads aren’t… that may indeed be a bug.

I tested this and I cannot replicate it. ~~Although I wonder: can you look in your `sites/default/files` directory to see if the plant type image was uploaded there instead of `sites/default/private/files`? The former is “public” while the latter is “private”. If it’s in the “public” directory, that might suggest there’s a bug when farmOS is installed without a private filesystem configured… please let me know.~~

Edit: oops I mixed things up - disregard the above. (Although maybe still worth checking to see if anything was uploaded into `sites/default/files` public directory (or a subdirectory therein)…

---

<div class="post-metadata">

**Author:** ![Symbioquine](https://yyz2.discourse-cdn.com/free1/user_avatar/farmos.discourse.group/symbioquine/32/284_2.png) [@Symbioquine](https://farmos.discourse.group/u/Symbioquine)\
**Post date:** [February 15, 2022, 5:08pm UTC](https://farmos.discourse.group/t/kml-import-in-2-x/1108/22 "2022-02-15T17:08:26Z")

</div>

Cross-posting [Share your JupyterLite Examples - #7 by Symbioquine](https://farmos.discourse.group/t/share-your-jupyterlite-examples/1134/7) for future reference since some folks may find JupyterLite a compelling way to do their KML imports - especially if they need more control over how fields are mapped/transformed during import.

---

<div class="post-metadata">

**Author:** ![Farmy](https://avatars.discourse-cdn.com/v4/letter/f/eada6e/32.png) [@Farmy](https://farmos.discourse.group/u/Farmy)\
**Post date:** [February 16, 2022, 6:10pm UTC](https://farmos.discourse.group/t/kml-import-in-2-x/1108/23 "2022-02-16T18:10:51Z")

</div>

I changed to Ubuntu Linux, also with Docker. Same thing here: I cant upload files. Here are some snapshots:

 ![image](https://global.discourse-cdn.com/free1/uploads/farm_os/original/1X/b47c6da1672fbfbbfef02668a2860abdead3a185.png)  
 ![image](https://global.discourse-cdn.com/free1/uploads/farm_os/original/1X/7dce401bd5fa2267b5cd381321b35380ee100575.png)  
 ![image](https://global.discourse-cdn.com/free1/uploads/farm_os/original/1X/f375df6e7ce032f52e53be02f67d5c69616a03bc.png)

---

<div class="post-metadata">

**Author:** ![mstenta](https://yyz2.discourse-cdn.com/free1/user_avatar/farmos.discourse.group/mstenta/32/4_2.png) [@mstenta](https://farmos.discourse.group/u/mstenta)\
**Post date:** [February 16, 2022, 7:00pm UTC](https://farmos.discourse.group/t/kml-import-in-2-x/1108/24 "2022-02-16T19:00:41Z")

</div>

@Farmy Hmm it does look like your configuration is correct. Is this only affecting the KML import? Are you able to upload to assets/terms now?

What Docker image are you using? `farmos/farmos:2.0.0-beta2`? Or `farmos/farmos:2.x-dev`?

I see that `sites/default/private/files` has full write access to everyone, but it is owned by `papa:papa`. Normally you would have a group of `www-data`, and only owner/group write access. I’m curious if a `kml` directory exists inside `files` and what the ownership/permission of that is…

---

<div class="post-metadata">

**Author:** ![debo](https://avatars.discourse-cdn.com/v4/letter/d/e9bcb4/32.png) [@debo](https://farmos.discourse.group/u/debo)\
**Post date:** [February 17, 2022, 3:56pm UTC](https://farmos.discourse.group/t/kml-import-in-2-x/1108/25 "2022-02-17T15:56:34Z")

</div>

After much sleuthing and pain here’s how I ultimately solved the upload issue  
Seems to be a filepath problem  
remove the first slash as in  
**change**  
` /opt/drupal/web/sites/default/private/files`  
**to**  
` opt/drupal/web/sites/default/private/files`

hopefully that’ll fix your problem

---

<div class="post-metadata">

**Author:** ![Farmy](https://avatars.discourse-cdn.com/v4/letter/f/eada6e/32.png) [@Farmy](https://farmos.discourse.group/u/Farmy)\
**Post date:** [February 18, 2022, 4:15pm UTC](https://farmos.discourse.group/t/kml-import-in-2-x/1108/26 "2022-02-18T16:15:15Z")

</div>

The problem is solved. Not that I changed anything, but suddenly it worked. I just can imagine that certain caches were not flushed or any garbage collection didn’t work for hours. Is there any other way to flush caches except under Configuration - Development - Performance - Clear all caches?

---

<div class="post-metadata">

**Author:** ![mstenta](https://yyz2.discourse-cdn.com/free1/user_avatar/farmos.discourse.group/mstenta/32/4_2.png) [@mstenta](https://farmos.discourse.group/u/mstenta)\
**Post date:** [February 18, 2022, 4:27pm UTC](https://farmos.discourse.group/t/kml-import-in-2-x/1108/27 "2022-02-18T16:27:08Z")

</div>

Huh. Well glad it’s working! Although I wish we knew the cause. 🤔

> Is there any other way to flush caches except under Configuration - Development - Performance - Clear all caches?

That’s the main one - and should clear all Drupal caches. But I don’t think that would affect this…

Did you restart your server? I wonder if PHP’s `opcache` was affecting it…

---

<div class="post-metadata">

**Author:** ![Farmy](https://avatars.discourse-cdn.com/v4/letter/f/eada6e/32.png) [@Farmy](https://farmos.discourse.group/u/Farmy)\
**Post date:** [February 19, 2022, 5:21pm UTC](https://farmos.discourse.group/t/kml-import-in-2-x/1108/28 "2022-02-19T17:21:26Z")

</div>

Yes, I restarted the server several times.

---

<div class="post-metadata">

**Author:** ![mstenta](https://yyz2.discourse-cdn.com/free1/user_avatar/farmos.discourse.group/mstenta/32/4_2.png) [@mstenta](https://farmos.discourse.group/u/mstenta)\
**Post date:** [February 19, 2022, 6:34pm UTC](https://farmos.discourse.group/t/kml-import-in-2-x/1108/29 "2022-02-19T18:34:52Z")

</div>

If it started working after restarting the server, then perhaps PHP’s Opcache was to blame. 🤷

[Previous page](https://farmos.discourse.group/t/kml-import-in-2-x/1108.md?page=1)
