< 222021-12-23⋎24 >

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
03:39*natewrench123456 has joined
03:40*natewrench123456 has quit (Quit: Leaving)
11:23mstenta[m]<symbioquine[m]> "Maybe something's wrong with how..." <- symbioquine paul121 : ah ha! i figured this one out...
11:23mstenta[m]This is what we have now: `new URL('/assets/geojson/' + geomType + '/' + assetType, window.location.origin + drupalSettings.path.baseUrl);`
11:24mstenta[m]If I remove the leading `/` from that, then it works correctly in a subdirectory.
11:24mstenta[m]eg: `new URL('assets/geojson/' + geomType + '/' + assetType, window.location.origin + drupalSettings.path.baseUrl);`
11:25mstenta[m]Here's the explanation from MDN's `URL()` docs:
11:25mstenta[m]> The constructor takes a `url` parameter, and an optional `base` parameter to use as a base if the `url` parameter is a relative URL
11:25mstenta[m]developer.mozilla.org/en-US/docs/Web/API
11:26mstenta[m]We are passing the optional `base` parameter, but we are using an absolute `url`
11:26mstenta[m]TIL!
15:26paul121[m]Ooooh! Interesting. Easy fix
15:43symbioquine[m]Hah! Nice! 😁
21:51*sgoodall has quit (Ping timeout: 252 seconds)
21:53*sgoodall has joined

< 222021-12-23⋏24 >