nextcloud / nextcloud/cookbook

Number of categories differs between the GUI and the API

Open
#2,222 9 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
HTML
Stars
641
Forks
113
Avg merge
21h 31m
Merged PRs (30d)
26

Description

Description

The total count of categories presented in the GUI significantly varies when compared to what is available through the API.

Reproduction
Steps to reproduce the behavior:

  1. Add many recipes
  2. Compare the numbers

Expected behavior
The numbers should be the same.

Actual behavior
The numbers are different. The numbers shown in the GUI are correct. The API numbers are wrong.

Screenshots

API
[
    {
        "name": "Asia",
        "recipe_count": 18
    },
    {
        "name": "Beilagen",
        "recipe_count": 12
    },
    {
        "name": "Braten",
        "recipe_count": 2
    },
    {
        "name": "Brotzeit",
        "recipe_count": 6
    },
    {
        "name": "Cocktails",
        "recipe_count": 2
    },
    {
        "name": "Dessert",
        "recipe_count": 42
    },
    {
        "name": "Dünsten",
        "recipe_count": 2
    },
    {
        "name": "Eis",
        "recipe_count": 8
    },
    {
        "name": "Fisch",
        "recipe_count": 26
    },
    {
        "name": "Fleisch",
        "recipe_count": 28
    },
    {
        "name": "Gebäck",
        "recipe_count": 12
    },
    {
        "name": "Gemüse",
        "recipe_count": 2
    },
    {
        "name": "Getränke",
        "recipe_count": 6
    },
    {
        "name": "Grillen",
        "recipe_count": 24
    },
    {
        "name": "Hauptgericht",
        "recipe_count": 40
    },
    {
        "name": "Kuchen",
        "recipe_count": 55
    },
    {
        "name": "Muffins",
        "recipe_count": 14
    },
    {
        "name": "Salate",
        "recipe_count": 20
    },
    {
        "name": "Schnelle Küche",
        "recipe_count": 2
    },
    {
        "name": "Soße",
        "recipe_count": 2
    },
    {
        "name": "Suppe",
        "recipe_count": 8
    },
    {
        "name": "Torten",
        "recipe_count": 38
    },
    {
        "name": "Veggie",
        "recipe_count": 14
    },
    {
        "name": "Vorspeise",
        "recipe_count": 12
    },
    {
        "name": "*",
        "recipe_count": 1
    }
]
GUI

image

Browser
Chrome 123.0

Versions
Nextcloud server version: 28.0.3
Cookbook version: 0.11.0
Database system: MariaDB

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the discrepancy by adding many recipes, then compare the category totals shown in the GUI with the API response using the reported Nextcloud 28.0.3, Cookbook 0.11.0, and MariaDB setup. Trace how each side calculates category counts; the work is done when both sources report the same numbers.

Written by the indexing model from the issue text.

Assessment

Tech stack
mariadb
Domain
api, databases
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.