< 252021-03-26⋎27 >

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
04:43*farmBOT has joined
16:06* < matrix.org/_matrix/media/r0/download/mat >
16:07*uploaded an image: (33KiB) < matrix.org/_matrix/media/r0/download/mat >
16:08symbioquine[m]I have the equivalent of [this code](github.com/farmOS/farmOS/blob/92f854b9be) in my view too...
16:13paul121[m]huh.. seems like you've got it integrated with `hook_farm_ui_entity_views` just fine
16:14paul121[m]my guess is an issue with the contextual filter
16:14paul121[m]can change the "display no results behavior" to show something?
16:15paul121[m]and/or for the contextual filter, if it doesn't exist or validate, make sure it still renders something?
16:15symbioquine[m]Yeah, I tried that, but still nothing is showing up under the header.
16:15symbioquine[m]It's like the view isn't even trying to render actually...
16:15paul121[m]right.. weird!
16:16paul121[m]and you can preview the view OK? by manually filling the contextual filter?
16:18symbioquine[m]Well, I don't have much experience with these contextual views so I wasn't sure what input to put there...
16:18symbioquine[m]some sort of query string?
16:19paul121[m]ah. yea, try just putting in an asset id
16:19symbioquine[m]as just the bare number?
16:19paul121[m]yes
16:19symbioquine[m]interesting
16:19paul121[m]if that doesn't work you might need to put in `asset/{id}`
16:20paul121[m]your contextual filter should probably be configured to grab the second path argument from the URL
16:20paul121[m](wait... maybe the third. is the path `/farm/asest/{id}` ?) My brain is stuck in D9)
16:21paul121[m]oh... you're putting this on a term page!
16:21symbioquine[m]I'm testing this part first on the `farm_plantings` view
16:22symbioquine[m]Just to make sure I understand how to test it with a working view
16:23symbioquine[m]It does render when I set the path to `/farm/asset/2569` (a valid planting id), but it didn't seem to affect the results - which probably makes sense since there isn't a contextual filter for planting on the plantings view.
16:23paul121[m]right
16:24paul121[m]for your `farm_seeds` view I think the contextual filter would be `/farm/crop/{crop_name}`
16:25paul121[m]with a contextual filter that validates the taxonomy term name
16:26symbioquine[m]Just focusing on the `farm_plantings` view though (which we know works) - if I put in `/farm/crop/Wheat-Kyle` it doesn't appear to affect the results in the view preview.
16:27*uploaded an image: (86KiB) < matrix.org/_matrix/media/r0/download/mat >
16:28symbioquine[m]This is at `/admin/structure/views/view/farm_plantings/edit`
16:28paul121[m]maybe it does need the taxonomy term ID ?
16:28symbioquine[m]I also tried `/taxonomy/term/404`
16:34paul121[m]hmm
16:35symbioquine[m]I think I might need to trace through [this code](github.com/farmOS/farmOS/blob/92f854b9be) next...
16:35symbioquine[m]Might be somehow it's not finding my view or passing the args as expected.
16:39paul121[m]yeah
16:39paul121[m]I'm trying to find where `farm_plantings` is added to the term page?
16:39paul121[m]did you find that?
16:39symbioquine[m]yeah
16:40symbioquine[m]oh, wait
16:40symbioquine[m]No, I'm not sure about that
16:41paul121[m]I think the `farm_crops` view might be used there..
16:41symbioquine[m]I was using these examples; [1](github.com/farmOS/farmOS/blob/92f854b9be), [2](github.com/farmOS/farmOS/blob/92f854b9be)
16:41symbioquine[m]but maybe they're not representative.
16:42paul121[m][here](github.com/farmOS/farmOS/blob/92f854b9be)
16:42symbioquine[m]But that only has an effect if vocabulary_machine_name == `farm_crop_families`
16:43symbioquine[m]So, I think that's supposed to add the list of `farm_crops` to the `farm_crop_families` taxonomy page.
16:43paul121[m]ah ah yes. you're right
16:44symbioquine[m]Could it be this: github.com/farmOS/farmOS/blob/92f854b9be ?
16:46paul121[m]think so!
16:48paul121[m]well, only kinda
16:48paul121[m]I think specifying `farm_asset` must tell it to use the view configured for `planting` asset
16:49paul121[m] * I think specifying `farm_asset` must tell it to use the view configured for `planting` asset defined [here](github.com/farmOS/farmOS/blob/92f854b9be)
16:50paul121[m] * I think specifying `farm_asset = planting` must tell it to use the view configured for `planting` asset defined [here](github.com/farmOS/farmOS/blob/92f854b9be)
16:51paul121[m]based on the docs [here](github.com/farmOS/farmOS/blob/92f854b9be)
16:57paul121[m]You could also implement `hook_entity_view` and render the view yourself: github.com/farmOS/farmOS/blob/92f854b9be
17:03symbioquine[m]Cool, I'll play around with those this evening... Thanks for looking into it!
18:14*twiclo has quit (Ping timeout: 258 seconds)

< 252021-03-26⋏27 >