IRC logs for #farmOS, 2020-02-27 (GMT)

2020-02-26
2020-02-28
TimeNickMessage
[00:13:26]* JustTB has quit (Ping timeout: 258 seconds)
[05:41:05]* JustTB has joined #farmos
[06:55:58]* JustTB has quit (Quit: Leaving.)
[06:59:02]* JustTB has joined #farmos
[08:30:03]* JustTB has quit (Ping timeout: 260 seconds)
[08:43:15]* JustTB has joined #farmos
[09:29:16]* JustTB has quit (Ping timeout: 258 seconds)
[09:48:07]* JustTB has joined #farmos
[09:58:02]* JustTB has quit (Ping timeout: 240 seconds)
[11:33:07]<zedrckr[m]>Hello, it's me, again
[11:33:07]<zedrckr[m]>In the latest version of farmOS, how can I default to base layers of google hybrid?
[11:38:32]<mstenta[m]>zedrckr: good question! this was asked recently... let me find the link...
[11:38:49]<mstenta[m]>https://github.com/farmOS/farmOS/issues/254
[11:43:43]<mstenta[m]>long story short: it should save your selected base layer in your browser's localStorage and remember that next time you load a page
[11:44:45]<mstenta[m]>in that issue they reported that something was not working for them in that regard, however... in firefox... although they tried it in chrome and it worked
[11:44:48]<mstenta[m]>it is working for me in firefox
[11:44:59]<mstenta[m]>so i'm still waiting to hear back from them
[11:45:17]<zedrckr[m]>Yes, long story.
[11:45:17]<zedrckr[m]>The same thing happens to me, I am using google chrome, and it doesn't remember the layer that I selected, when navigating to another one it returns to the default
[11:46:38]<mstenta[m]>oh hmm
[11:50:09]<zedrckr[m]>ACTION uploaded an image: image.png (10KB) < https://matrix.org/_matrix/media/r0/download/matrix.org/nHCuMnkrPIXuMxCK... >
[11:51:29]<zedrckr[m]>I navigate to another route
[11:51:39]<zedrckr[m]>ACTION uploaded an image: image.png (17KB) < https://matrix.org/_matrix/media/r0/download/matrix.org/AWxgqcdsvgcjdMzU... >
[11:51:53]<zedrckr[m]>y no muestra nada
[11:52:17]<zedrckr[m]> * I can not see anything
[13:03:15]<mstenta[m]>that's interesting thanks zedrckr
[13:03:29]<mstenta[m]>it looks like it IS saving the variables in localStorage
[13:03:45]<mstenta[m]>are there any errors in your javascript console?
[13:04:42]<mstenta[m]>do you have a github account? would you mind adding your clues to the issue?
[13:04:46]<mstenta[m]>so we can keep track of it together
[13:05:12]<zedrckr[m]>ACTION uploaded an image: image.png (12KB) < https://matrix.org/_matrix/media/r0/download/matrix.org/pmDkLbprTiIFySdc... >
[13:05:37]<zedrckr[m]><mstenta[m] "do you have a github account? wo">
[13:07:34]<mstenta[m]>and so: when you load the page and the map is blank, in your "base layers" - is there NO layer selected?
[13:08:06]<zedrckr[m]>Exactly that is what happens
[13:08:46]<mstenta[m]>hmm
[13:10:54]<mstenta[m]>zedrckr: this is the same map code deployed to github pages: https://farmos.github.io/farmOS-map/
[13:11:07]<mstenta[m]>can you try that and see if the same issue happens to you there?
[13:11:24]<mstenta[m]>if so, then it's an issue in the farmOS-map.js, if not, then it might be an issue in farmOS itself
[13:11:47]<mstenta[m]>just try changing the base layer and reloading the page
[13:11:49]<zedrckr[m]><mstenta[m] "can you try that and see if the ">
[13:11:54]<mstenta[m]>thanks
[13:12:49]<zedrckr[m]><mstenta[m] "if so, then it's an issue in the">
[13:15:05]<mstenta[m]>Yes this is one of the things that changed in the new version
[13:15:26]<mstenta[m]>Did the standalone map behave any differently?
[13:16:18]<zedrckr[m]>ACTION uploaded an image: image.png (1190KB) < https://matrix.org/_matrix/media/r0/download/matrix.org/OPOAVOeWVHpmDBmx... >
[13:16:19]<mstenta[m]>I'm testing right now on my phone in both chrome and Firefox and it is remembering the selected layer
[13:16:35]<zedrckr[m]><mstenta[m] "Did the standalone map behave an"> all right
[13:18:39]<mstenta[m]>If you select a different base layer and refresh the page, does it remember the layer you selected?
[13:19:14]<zedrckr[m]>Does not remember her
[13:19:25]<mstenta[m]>Ok
[13:19:33]<mstenta[m]>You're using chrome?
[13:19:47]<mstenta[m]>Do you have Firefox? Can you see if it works differently?
[13:35:58]<jgaehring[m]>it would probably be helpful to know which browser and its version number you're using, zedrckr... you can typically get the version # for most browsers by going to Help > About
[14:12:05]<mstenta[m]>https://stackoverflow.com/questions/29560441/localstorage-is-not-working...
[14:12:18]<mstenta[m]>Hmm two things that I see in that statckoverflow thread:
[14:12:44]<mstenta[m]>1. localStorage must use strings... not booleans. we may be inadvertently saving a boolean instead of "true" or "false"
[14:13:34]<mstenta[m]>2. farmOS-map is doing `localStorage.setItem()`, but maybe it needs to be `window.localStorage.setItem()`
[14:13:41]<mstenta[m]>?
[15:45:47]<mstenta[m]>zedrckr - I am making a small change which may fix this. Can you test it for me in a moment?
[15:50:31]<mstenta[m]>Try the same test here: https://mstenta.github.io/farmOS-map/
[15:50:42]<mstenta[m]>Open that URL, change the base layer, refresh the page... does it remember your selection now?
[15:51:52]<mstenta[m]>If that doesn't work... I may try one more thing...
[17:16:44]<zedrckr[m]><mstenta[m] "If that doesn't work... I may tr"> Yes, now it works.
[17:17:57]<mstenta[m]>WOO HOO!
[17:18:03]<mstenta[m]>that was it! wow!
[17:18:15]<mstenta[m]>thanks for testing zedrckr
[17:18:57]<mstenta[m]>so... what i will do is package up a v1.0.1 of the farmOS-map.js library - which you can then download and drop into the `profiles/farm/libraries/farmOS-map` directory on your server
[17:27:02]<mstenta[m]>i won't have a chance to do that until tomorrow - but i will let you know when it's available - and will close that github issue, so you can either watch the chat or that issue
[17:52:34]<jgaehring[m]><mstenta[m] "that was it! wow!"> what was it? did this commit do it? https://github.com/mstenta/farmOS-map/commit/2784b4e7a3182db6ec94795167a...
[17:54:21]<jgaehring[m]>ohhhh, I think I found the issue...
[17:54:56]<jgaehring[m]>I would revert that commit, actually, mstenta ... I'll explain in the GH issue
[17:57:51]<mstenta[m]>Uh oh :-)
[17:58:05]<mstenta[m]>K no worries I won't do anything until tomorrow
[17:58:09]<mstenta[m]>Family time
[18:01:16]<jgaehring[m]>my comments are here: https://github.com/farmOS/farmOS-map/issues/65#issuecomment-592221393