< 232020-12-24⋎25 >

farmOS (farmos.org) is a free and open source, web-based farm management system. User guide: farmos.org/guide/ - Feature requests and bug reports: github.com/farmOS/farmOS/issuesSet by ChanServ on 2018-08-16 at 14:32
00:15*lauriexwayne[m] has joined
00:16lauriexwayne[m]Thanks for the invite jgaehring!!! Nice to see you farmOS team and friends - I'm visiting from the Open Food Network.
03:00symbioquine[m]Is there a better way to save new areas than `taxonomy_term_save`? I was surprised to find that it doesn't seem to enforce the [allowed_values_function](github.com/farmOS/farmOS/blob/92f854b9be)...
03:07paul121[m]hmm yea, as far as I know the `allowed_values` are only used to provide options. there might not be anything that enforces those options when saving
03:08symbioquine[m]There is when saving the area form...
03:08symbioquine[m]If I hack up the html to add a new option to the select dropdown it fails to save
03:08paul121[m]sorry, thinking in the entity API level
03:09*uploaded an image: image.png (27KiB) < matrix.org/_matrix/media/r0/download/mat >
03:09symbioquine[m]<paul121[m] "sorry, thinking in the entity AP"> Yeah, that's what I'm looking for... just seems surprising that the validation would only apply to the UI.
03:10symbioquine[m]Through the API I can put any value I want and it saves without complaint;
03:10*uploaded an image: image.png (3KiB) < matrix.org/_matrix/media/r0/download/mat >
03:21paul121[m]wouldn't be surprised if there's a contrib module that provides that... especially worth considering for 2.x!
03:21paul121[m]theres a few fields that use the `allowed_values`, would be good to have those enforced over the API
03:22paul121[m]I noticed that they are NOT included in the JSONAPI schema (pretty sure I checked this) which is a bummer
03:22paul121[m]but a worthwhile contribution
03:23paul121[m]I'm learning that the D8 JSONAPI is quite connected to the entity model beneath it... so if the entity api had the concept of the allowed values, then JSONAPI likely would too
05:20*svenn has quit (Ping timeout: 260 seconds)
05:20*svenn has joined
07:16*svenn has quit (Ping timeout: 268 seconds)
07:19*svenn has joined
09:01*svenn has quit (Read error: Connection reset by peer)
09:03*svenn has joined
10:29mstenta[m]symbioquine paul121 : I *believe* Drupal 8/9 may handle validation via the API - D7 definitely was lacking in that area - but from what I understand validation is on the Entity API level now... rather than having to be implemented at both the Form API and REST API levels
11:47mstenta[m](and notably, D7 didn't have any concept of "REST API" - that was an add-on module - everything is more tightly integrated now)
15:30paul121[m]cool! we'll have to test that out

< 232020-12-24⋏25 >