| [21:53:16] | * JustTB has quit (Quit: Leaving.) |
| [05:00:15] | * gretel[m] has left #farmos ("Kicked by @appservice-irc:matrix.org : Idle for 30+ days") |
| [05:00:25] | * rsteup[m] has left #farmos ("Kicked by @appservice-irc:matrix.org : Idle for 30+ days") |
| [07:29:17] | * farmBOT has joined #farmos |
| [13:22:20] | <paul121[m]> | development question for y'all.. |
| [13:22:49] | <paul121[m]> | I'm building a custom page that displays a list of Planting assets |
| [13:22:56] | <paul121[m]> | (can't use views for this) |
| [13:23:33] | <paul121[m]> | and I'm adding 2 dropdown select fields to filter the plantings by Crop Family and Variety |
| [13:24:03] | <paul121[m]> | I thought there might be a helper function to load all crop/variety terms that are a part of a Crop Family |
| [13:24:16] | <paul121[m]> | but didn't see any! |
| [13:24:53] | <paul121[m]> | had to write EntityFieldQueries for taxonomy terms that reference the Crop Family |
| [13:25:17] | <paul121[m]> | is there an easier way to do this? (did I miss the helper function?) |
| [13:25:36] | <paul121[m]> | and would this be a useful helper function to add to core? |
| [13:25:44] | <mstenta[m]> | No, I don't think there is a helper function. |
| [13:26:00] | <mstenta[m]> | To be honest, the Crop Family taxonomy was added early on, but was never really taken anywhere after that |
| [13:26:12] | <mstenta[m]> | It's not used anywhere except in the Crop/variety terms as a term reference |
| [13:26:38] | <mstenta[m]> | If you want to add a helper function, feel free! I would have probably suggested `EntityFieldQuery`, so you're on the right track. :-) |
| [13:27:08] | <paul121[m]> | ah gotcha |
| [13:27:30] | <paul121[m]> | there is a `taxonomy_term_get_children` method |
| [13:27:44] | <paul121[m]> | which is similar, but doesn't bridge the gap of Crops/Varieties and Crop Families |
| [13:27:56] | <paul121[m]> | do you envision us keeping the Crop Families vocabulary? |
| [13:27:57] | <mstenta[m]> | right - that's only for getting child terms within the same taxonomy |
| [13:28:14] | <mstenta[m]> | > do you envision us keeping the Crop Families vocabulary? |
| [13:28:14] | <mstenta[m]> | that's the 64 thousand dollar question... ;-) |
| [13:28:46] | <paul121[m]> | * there is a `taxonomy_get_children` method |
| [13:28:47] | <mstenta[m]> | It has always felt like a hanging thread to me, honestly |
| [13:28:48] | <paul121[m]> | hahah |
| [13:28:52] | <mstenta[m]> | If I could go back, I might not have added it in the first place |
| [13:29:44] | <paul121[m]> | it is added complexity, which adds to the general learning curve (but also really isn't too complex) |
| [13:30:19] | <paul121[m]> | when there are ~100 Crop/Variety terms, I think it is useful to have the separate Crop Families vocab |
| [13:30:52] | <paul121[m]> | rather than requiring the terms to be in a hierarchy |
| [13:30:57] | <mstenta[m]> | yea |
| [13:31:58] | <mstenta[m]> | the whole topic of crop lists is sort of a round peg in a square hole with the Drupal taxonomy approach... it was the most logical way to do it, but there are some limitations |
| [13:32:13] | <mstenta[m]> | * the whole topic of crop lists is sort of a round peg in a square hole with the Drupal taxonomy approach... it was the most logical way to do it when we started, i think, but there are some limitations |
| [13:33:00] | <mstenta[m]> | i wish we had a better plan for 2.x, but i have a feeling we'll just need to keep what we have for 2.0.0... and maybe give thought to a better system (plus migration) after |
| [13:34:00] | <paul121[m]> | hm okay |
| [13:34:08] | <mstenta[m]> | open to ideas as always! :-) |
| [13:34:20] | <paul121[m]> | curious what the limitations are? |
| [13:35:05] | <mstenta[m]> | maybe not so much "limitations" as "UX difficulties" |
| [13:35:17] | <paul121[m]> | but in that regard, makes sense to have a helper function that abstracts how the families & varieties are implemented under the hood |
| [13:35:28] | <paul121[m]> | so that implementing code might not be affected |
| [13:35:40] | <mstenta[m]> | it's very free form right now, which makes it flexible... |
| [13:36:30] | <mstenta[m]> | there are some questions about if/how these might connect to the "Plant Data Service" in the future |
| [13:36:42] | <mstenta[m]> | i'm sort of waiting to see how that all develops |
| [13:45:54] | <paul121[m]> | makes sense. thanks for the info! |
| [14:50:42] | * and712[m] has joined #farmos |
| [15:32:26] | <mstenta[m]> | FYI all: a Drupal 7 security update was just released. I don't think it critically affects farmOS (because everything requires user login), but worth updating when you can. |
| [15:32:35] | <mstenta[m]> | Here is the SA: https://www.drupal.org/sa-core-2020-007 |
| [15:32:57] | <mstenta[m]> | I updated farmOS already: https://github.com/farmOS/farmOS/commit/6f85c888a9f8e29604af8876d3f10d84... |
| [15:33:16] | <mstenta[m]> | All Farmier-hosted sites are updated. |
| [15:34:39] | <mstenta[m]> | If you are self-hosting, you can either update to the dev release of farmOS (https://www.drupal.org/project/farm/releases/7.x-1.x-dev) or patch manually. |
| [15:35:09] | <mstenta[m]> | (Not sure if that dev release has been regenerated yet... check the "updated" timestamp and wait for it to update before downloading) |
| [15:35:40] | <mstenta[m]> | I created a simple patch file that you can use to easily apply the changes without doing a full code update: https://gist.github.com/mstenta/8a7d54d47bb12c2e989f4dcf7edd807b |
| [15:36:13] | <mstenta[m]> | Note that that patch ASSUMES you are running Drupal 7.72 (farmOS 7.x-1.5). If you are farther behind than that, then don't apply that patch. |