Category talk:Foods

From Ring of Brodgar

Sub-Category results in SMW category queries

Question for you mvgulik -
The FEP table page pulls data from the foods category, but it also pulls data from subcategories nested in foods. This leads to a number of non-food items being listed in the table without any data to accompany the item.
In the past for major offenders (for example, raw meat and raw fish filets) I simply removed that subcategory from foods, but I don't feel that's the best option.
Perhaps there is a way to enforce the FEP table to only gather data from it's main category and not subcategories?
Perhaps there's a way to create an FEP table without doing an #ask:Foods category request?
--Ricky (talk) 03:37, 28 November 2018 (EST)

With RoB's current SMW settings ($smwgUseCategoryHierarchy == "true") subcategory items are not/never ignored in SMW category related queries (which is and has been the SMW factory default).
Ref/Doc: SMW:Special property "Subcategory of"
There are 2 alternative approaches to work around this as far as I see:
  • 1) Using a property query, if the target data is available as property.
    • 2a) Setting up a property with the target data.
    • 2b) setting up a separate category with the target data, but without the troublesome sub-categories.
    • As I have not looked into this yet ... I'm not sure yet which one of these two (2a,2b) makes more sense (in the long run), and how best to go about it.
--.MvGulik. 12:28, 28 November 2018 (EST)

Sub-Categories

Poultry‎
None directly edible resources (food creation only ingredients)
(move ... but to where ...)

Other stuff

Blank entries
-like with "Beetroot Leaves".
Related to the used error checking code for food stats.
No apparent quick fix available for this.
Related section probably needs a general rewrite to properly handle zero-result cases.