TandoorRecipes / recipes

Application for managing recipes, planning meals, building shopping lists and much much more!
https://docs.tandoor.dev
Other
5.61k stars 597 forks source link

Can't update imported recipes #1730

Closed floli closed 2 years ago

floli commented 2 years ago

Tandoor Version

1.1.4, Ref: 0c841ec6862763c82961c3f8bf9ecfdac28e6604

Setup

Docker / Docker-Compose

Reverse Proxy

No reverse proxy

Other

No response

Bug description

Fresh test installation using the plain docker-compose.yaml and unchanged .env (besides the two passwords) from https://docs.tandoor.dev/install/docker/. Imported the recipes from Nextcloud Cookbook using the zip file, which worked really great.

However, I can't update the imported recipes, saving gives me:

Beim Aktualisieren einer Ressource ist ein Fehler aufgetreten!

which translates to:

Error updating a resource!

enabled debug mode and produces the logs below.

Creating a new recipe and updating that works. I also tried to restart the container, but no change.

Relevant logs

Erroneousness update:

tandoor-web_recipes-1    | 
tandoor-web_recipes-1    | 
tandoor-web_recipes-1    |   [SQL Queries for] /api/recipe/17/
tandoor-web_recipes-1    | 
tandoor-web_recipes-1    |   [TOTAL TIME: 0.002 seconds]
tandoor-web_recipes-1    |   [TOTAL QUERIES: 8]
tandoor-web_recipes-1    | Bad Request: /api/recipe/17/
tandoor-nginx_recipes-1  | 172.20.0.1 - - [17/Apr/2022:19:09:31 +0000] "PUT /api/recipe/17/ HTTP/1.1" 400 64 "http://localhost/edit/recipe/internal/17/" "Mozilla/5.0 (X11; Linux x86_64; rv:99.0) Gecko/20100101 Firefox/99.0" "-"
tandoor-web_recipes-1    | 172.20.0.4 - - [17/Apr/2022:21:09:31 +0200] "PUT /api/recipe/17/ HTTP/1.0" 400 64 "http://localhost/edit/recipe/internal/17/" "Mozilla/5.0 (X11; Linux x86_64; rv:99.0) Gecko/20100101 Firefox/99.0"

good update:

tandoor-web_recipes-1    | 
tandoor-web_recipes-1    | 
tandoor-web_recipes-1    |   [SQL Queries for] /api/recipe/22/
tandoor-web_recipes-1    | 
tandoor-web_recipes-1    |   [TOTAL TIME: 0.06200000000000004 seconds]
tandoor-web_recipes-1    |   [TOTAL QUERIES: 89]
tandoor-nginx_recipes-1  | 172.20.0.1 - - [17/Apr/2022:19:11:10 +0000] "PUT /api/recipe/22/ HTTP/1.1" 200 1887 "http://localhost/edit/recipe/internal/22/" "Mozilla/5.0 (X11; Linux x86_64; rv:99.0) Gecko/20100101 Firefox/99.0" "-"
tandoor-web_recipes-1    | 172.20.0.4 - - [17/Apr/2022:21:11:10 +0200] "PUT /api/recipe/22/ HTTP/1.0" 200 1887 "http://localhost/edit/recipe/internal/22/" "Mozilla/5.0 (X11; Linux x86_64; rv:99.0) Gecko/20100101 Firefox/99.0"
vabene1111 commented 2 years ago

thanks for the detailed report. Sadly finding the log for this issue is a little tricky or lets say not as obvious as it should be.

If you open the inspector in your browser and look at the networks panel it should show the request that fails. Can you post me both the payload and the response of the request, this should help me figure out whats going on here.

floli commented 2 years ago

Sure, brace for impact:

Request headers:

PUT /api/recipe/20/ HTTP/1.1
Host: localhost
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:99.0) Gecko/20100101 Firefox/99.0
Accept: application/json, text/plain, */*
Accept-Language: de,en-US;q=0.7,en;q=0.3
Accept-Encoding: gzip, deflate, br
Content-Type: application/json
Content-Length: 13763
X-CSRFTOKEN: vUWaf9F727PsjICC490dikYrswIWBboCYMYnXlGFuRlDIbbv6HJd0FrBTQSyri7G
Origin: http://localhost
Sec-Fetch-Dest: empty
Sec-Fetch-Mode: cors
Sec-Fetch-Site: same-origin
Referer: http://localhost/edit/recipe/internal/20/
Connection: keep-alive
Cookie: nc_sameSiteCookiestrict=true; auth_token=6f75a664-76e2-418d-9fe5-0ec0649a9a4e; remember_web_59ba36addc2b2f9401580f014c7f58ea4e30989d=eyJpdiI6InFCa2gwczR3NnF0dDF3RjJsSVpmWmc9PSIsInZhbHVlIjoiK3lSQUVRQ0hsV1ptN1FJUEJDMklEMTlkcmRSM2g5QU9ydjdsTGkzRXVlRDZMNU94ZUVUajNFa3RLS2ZKWTdEc1pFOG9hYk1VSnpVb09RWEJLRlJxQkt5MUJnVUs0ZzYrSEhUYkJkd3h1NkFYTUZHMjJIWmQyK1ZnajZLUGw0ellvMEJ4eU9TNkdaWE9BZUF0b0FYd2FxRmRmcXk3Tlp6bjFTc3lOamNoMEp2cmVuc3Q2d0hEVUNlWTFCWWg4c1I3WlRYaVZTOVVHWVRVREk3cHFUNGprZXBkRkw2Qm9TS3VKMlJEZlZvQ3FUOD0iLCJtYWMiOiI4M2QzODc3MTRlMWI0Y2ViYjg1MWQ2NTFmYWI4ZWYzZDUwM2Q2NzJmNGZmNDczNGQxMGU3YWY5MmJkYzgzM2UyIn0%3D; csrftoken=vUWaf9F727PsjICC490dikYrswIWBboCYMYnXlGFuRlDIbbv6HJd0FrBTQSyri7G; sessionid=p18130i385spaq46lk14ov3njamxjzam; search_settings3=%7B%22advanced_search_visible%22%3Afalse%2C%22explain_visible%22%3Afalse%2C%22search_input%22%3A%22%22%2C%22search_internal%22%3Afalse%2C%22search_keywords%22%3A%5B%7B%22items%22%3A%5B%5D%2C%22operator%22%3Atrue%2C%22not%22%3Afalse%7D%2C%7B%22items%22%3A%5B%5D%2C%22operator%22%3Afalse%2C%22not%22%3Afalse%7D%2C%7B%22items%22%3A%5B%5D%2C%22operator%22%3Atrue%2C%22not%22%3Atrue%7D%2C%7B%22items%22%3A%5B%5D%2C%22operator%22%3Afalse%2C%22not%22%3Atrue%7D%5D%2C%22search_foods%22%3A%5B%7B%22items%22%3A%5B%5D%2C%22operator%22%3Atrue%2C%22not%22%3Afalse%7D%2C%7B%22items%22%3A%5B%5D%2C%22operator%22%3Afalse%2C%22not%22%3Afalse%7D%2C%7B%22items%22%3A%5B%5D%2C%22operator%22%3Atrue%2C%22not%22%3Atrue%7D%2C%7B%22items%22%3A%5B%5D%2C%22operator%22%3Afalse%2C%22not%22%3Atrue%7D%5D%2C%22search_books%22%3A%5B%7B%22items%22%3A%5B%5D%2C%22operator%22%3Atrue%2C%22not%22%3Afalse%7D%2C%7B%22items%22%3A%5B%5D%2C%22operator%22%3Afalse%2C%22not%22%3Afalse%7D%2C%7B%22items%22%3A%5B%5D%2C%22operator%22%3Atrue%2C%22not%22%3Atrue%7D%2C%7B%22items%22%3A%5B%5D%2C%22operator%22%3Afalse%2C%22not%22%3Atrue%7D%5D%2C%22search_units%22%3A%5B%5D%2C%22search_units_or%22%3Atrue%2C%22search_rating_gte%22%3Atrue%2C%22timescooked_gte%22%3Atrue%2C%22makenow%22%3Afalse%2C%22cookedon_gte%22%3Atrue%2C%22createdon_gte%22%3Atrue%2C%22updatedon_gte%22%3Atrue%2C%22viewedon_gte%22%3Atrue%2C%22sort_order%22%3A%5B%5D%2C%22pagination_page%22%3A1%2C%22keywords_fields%22%3A1%2C%22foods_fields%22%3A1%2C%22books_fields%22%3A1%2C%22rating_fields%22%3A1%2C%22units_fields%22%3A1%7D

Response headers:

HTTP/1.1 400 Bad Request
Server: nginx/1.21.6
Date: Sun, 17 Apr 2022 21:29:15 GMT
Content-Type: application/json
Content-Length: 67
Connection: keep-alive
Vary: Accept, Accept-Language, Cookie
Allow: GET, PUT, PATCH, DELETE, HEAD, OPTIONS
X-Frame-Options: DENY
Content-Language: de
X-Content-Type-Options: nosniff
Referrer-Policy: same-origin

Payload:

{
    "created_at": "2022-04-17T20:46:04.395191+02:00",
    "created_by": 1,
    "description": "",
    "file_path": "",
    "id": 20,
    "image": "http://localhost/media/recipes/e8748886-e082-42b4-bbdf-4f7aa3bc6bcb_20.jpg",
    "internal": true,
    "keywords": [
        {
            "created_at": "2022-04-17T20:45:56.441055+02:00",
            "description": "Imported by florian at 17. April 2022 20:45. Type: NEXTCLOUD",
            "full_name": "Import > Import 1",
            "icon": "📥",
            "id": 2,
            "label": "📥 Import 1",
            "name": "Import 1",
            "numchild": 0,
            "parent": 1,
            "updated_at": "2022-04-17T20:45:56.441071+02:00"
        },
        {
            "created_at": "2022-04-17T20:45:56.476706+02:00",
            "description": "",
            "full_name": "",
            "icon": null,
            "id": 3,
            "label": "",
            "name": "",
            "numchild": 0,
            "parent": null,
            "updated_at": "2022-04-17T20:45:56.476721+02:00"
        },
        {
            "created_at": "2022-04-17T20:46:01.889568+02:00",
            "description": "",
            "full_name": "indisch",
            "icon": null,
            "id": 7,
            "label": "indisch",
            "name": "indisch",
            "numchild": 0,
            "parent": null,
            "updated_at": "2022-04-17T20:46:01.889622+02:00"
        }
    ],
    "last_cooked": null,
    "name": "Masalla-Blumenkohl mit Couscous",
    "nutrition": null,
    "rating": 0,
    "servings": 3,
    "servings_text": "",
    "steps": [
        {
            "file": null,
            "file_visible": false,
            "id": 78,
            "ingredients": [
                {
                    "amount": 20,
                    "food": {
                        "child_inherit_fields": [],
                        "description": "",
                        "food_onhand": false,
                        "full_name": "frische Petersilie",
                        "id": 133,
                        "ignore_shopping": false,
                        "inherit_fields": [],
                        "name": "frische Petersilie",
                        "numchild": 0,
                        "parent": null,
                        "recipe": null,
                        "substitute": [],
                        "substitute_children": false,
                        "substitute_onhand": false,
                        "substitute_siblings": false,
                        "supermarket_category": null
                    },
                    "id": 205,
                    "is_header": false,
                    "no_amount": false,
                    "note": "",
                    "order": 0,
                    "original_text": "20 g frische Petersilie",
                    "unit": {
                        "description": null,
                        "id": 1,
                        "name": "g"
                    }
                },
                {
                    "amount": 2,
                    "food": {
                        "child_inherit_fields": [],
                        "description": "",
                        "food_onhand": false,
                        "full_name": "Gurken",
                        "id": 134,
                        "ignore_shopping": false,
                        "inherit_fields": [],
                        "name": "Gurken",
                        "numchild": 0,
                        "parent": null,
                        "recipe": null,
                        "substitute": [],
                        "substitute_children": false,
                        "substitute_onhand": false,
                        "substitute_siblings": false,
                        "supermarket_category": null
                    },
                    "id": 206,
                    "is_header": false,
                    "no_amount": false,
                    "note": "",
                    "order": 1,
                    "original_text": "2 Gurken",
                    "unit": null
                },
                {
                    "amount": 1,
                    "food": {
                        "child_inherit_fields": [],
                        "description": "",
                        "food_onhand": false,
                        "full_name": "Blumenkohl",
                        "id": 125,
                        "ignore_shopping": false,
                        "inherit_fields": [],
                        "name": "Blumenkohl",
                        "numchild": 0,
                        "parent": null,
                        "recipe": null,
                        "substitute": [],
                        "substitute_children": false,
                        "substitute_onhand": false,
                        "substitute_siblings": false,
                        "supermarket_category": null
                    },
                    "id": 207,
                    "is_header": false,
                    "no_amount": false,
                    "note": "",
                    "order": 2,
                    "original_text": "1 Blumenkohl",
                    "unit": null
                },
                {
                    "amount": 100,
                    "food": {
                        "child_inherit_fields": [],
                        "description": "",
                        "food_onhand": false,
                        "full_name": "Ruccula",
                        "id": 135,
                        "ignore_shopping": false,
                        "inherit_fields": [],
                        "name": "Ruccula",
                        "numchild": 0,
                        "parent": null,
                        "recipe": null,
                        "substitute": [],
                        "substitute_children": false,
                        "substitute_onhand": false,
                        "substitute_siblings": false,
                        "supermarket_category": null
                    },
                    "id": 208,
                    "is_header": false,
                    "no_amount": false,
                    "note": "",
                    "order": 3,
                    "original_text": "100 g Ruccula",
                    "unit": {
                        "description": null,
                        "id": 1,
                        "name": "g"
                    }
                },
                {
                    "amount": 2,
                    "food": {
                        "child_inherit_fields": [],
                        "description": "",
                        "food_onhand": false,
                        "full_name": "Frühlingszwiebeln",
                        "id": 82,
                        "ignore_shopping": false,
                        "inherit_fields": [],
                        "name": "Frühlingszwiebeln",
                        "numchild": 0,
                        "parent": null,
                        "recipe": null,
                        "substitute": [],
                        "substitute_children": false,
                        "substitute_onhand": false,
                        "substitute_siblings": false,
                        "supermarket_category": null
                    },
                    "id": 209,
                    "is_header": false,
                    "no_amount": false,
                    "note": "",
                    "order": 4,
                    "original_text": "2 Frühlingszwiebeln",
                    "unit": null
                },
                {
                    "amount": 320,
                    "food": {
                        "child_inherit_fields": [],
                        "description": "",
                        "food_onhand": false,
                        "full_name": "Tomaten",
                        "id": 23,
                        "ignore_shopping": false,
                        "inherit_fields": [],
                        "name": "Tomaten",
                        "numchild": 0,
                        "parent": null,
                        "recipe": null,
                        "substitute": [],
                        "substitute_children": false,
                        "substitute_onhand": false,
                        "substitute_siblings": false,
                        "supermarket_category": null
                    },
                    "id": 210,
                    "is_header": false,
                    "no_amount": false,
                    "note": "",
                    "order": 5,
                    "original_text": "320 g Tomaten",
                    "unit": {
                        "description": null,
                        "id": 1,
                        "name": "g"
                    }
                },
                {
                    "amount": 1,
                    "food": {
                        "child_inherit_fields": [],
                        "description": "",
                        "food_onhand": false,
                        "full_name": "Zitrone",
                        "id": 136,
                        "ignore_shopping": false,
                        "inherit_fields": [],
                        "name": "Zitrone",
                        "numchild": 0,
                        "parent": null,
                        "recipe": null,
                        "substitute": [],
                        "substitute_children": false,
                        "substitute_onhand": false,
                        "substitute_siblings": false,
                        "supermarket_category": null
                    },
                    "id": 211,
                    "is_header": false,
                    "no_amount": false,
                    "note": "",
                    "order": 6,
                    "original_text": "1 Zitrone",
                    "unit": null
                },
                {
                    "amount": 20,
                    "food": {
                        "child_inherit_fields": [],
                        "description": "",
                        "food_onhand": false,
                        "full_name": "Ingwer",
                        "id": 137,
                        "ignore_shopping": false,
                        "inherit_fields": [],
                        "name": "Ingwer",
                        "numchild": 0,
                        "parent": null,
                        "recipe": null,
                        "substitute": [],
                        "substitute_children": false,
                        "substitute_onhand": false,
                        "substitute_siblings": false,
                        "supermarket_category": null
                    },
                    "id": 212,
                    "is_header": false,
                    "no_amount": false,
                    "note": "",
                    "order": 7,
                    "original_text": "20 g Ingwer",
                    "unit": {
                        "description": null,
                        "id": 1,
                        "name": "g"
                    }
                },
                {
                    "amount": 4,
                    "food": {
                        "child_inherit_fields": [],
                        "description": "",
                        "food_onhand": false,
                        "full_name": "Agavendicksaft",
                        "id": 138,
                        "ignore_shopping": false,
                        "inherit_fields": [],
                        "name": "Agavendicksaft",
                        "numchild": 0,
                        "parent": null,
                        "recipe": null,
                        "substitute": [],
                        "substitute_children": false,
                        "substitute_onhand": false,
                        "substitute_siblings": false,
                        "supermarket_category": null
                    },
                    "id": 213,
                    "is_header": false,
                    "no_amount": false,
                    "note": "",
                    "order": 8,
                    "original_text": "4 TL Agavendicksaft",
                    "unit": {
                        "description": null,
                        "id": 12,
                        "name": "TL"
                    }
                },
                {
                    "amount": 140,
                    "food": {
                        "child_inherit_fields": [],
                        "description": "",
                        "food_onhand": false,
                        "full_name": "Kokosnussjoghurt",
                        "id": 139,
                        "ignore_shopping": false,
                        "inherit_fields": [],
                        "name": "Kokosnussjoghurt",
                        "numchild": 0,
                        "parent": null,
                        "recipe": null,
                        "substitute": [],
                        "substitute_children": false,
                        "substitute_onhand": false,
                        "substitute_siblings": false,
                        "supermarket_category": null
                    },
                    "id": 214,
                    "is_header": false,
                    "no_amount": false,
                    "note": "",
                    "order": 9,
                    "original_text": "140 g Kokosnussjoghurt",
                    "unit": {
                        "description": null,
                        "id": 1,
                        "name": "g"
                    }
                },
                {
                    "amount": 200,
                    "food": {
                        "child_inherit_fields": [],
                        "description": "",
                        "food_onhand": false,
                        "full_name": "Perlcouscous",
                        "id": 140,
                        "ignore_shopping": false,
                        "inherit_fields": [],
                        "name": "Perlcouscous",
                        "numchild": 0,
                        "parent": null,
                        "recipe": null,
                        "substitute": [],
                        "substitute_children": false,
                        "substitute_onhand": false,
                        "substitute_siblings": false,
                        "supermarket_category": null
                    },
                    "id": 215,
                    "is_header": false,
                    "no_amount": false,
                    "note": "",
                    "order": 10,
                    "original_text": "200 g Perlcouscous",
                    "unit": {
                        "description": null,
                        "id": 1,
                        "name": "g"
                    }
                },
                {
                    "amount": 2,
                    "food": {
                        "child_inherit_fields": [],
                        "description": "",
                        "food_onhand": false,
                        "full_name": "Olivenöl",
                        "id": 11,
                        "ignore_shopping": false,
                        "inherit_fields": [],
                        "name": "Olivenöl",
                        "numchild": 0,
                        "parent": null,
                        "recipe": null,
                        "substitute": [],
                        "substitute_children": false,
                        "substitute_onhand": false,
                        "substitute_siblings": false,
                        "supermarket_category": null
                    },
                    "id": 216,
                    "is_header": false,
                    "no_amount": false,
                    "note": "",
                    "order": 11,
                    "original_text": "2 EL Olivenöl",
                    "unit": {
                        "description": null,
                        "id": 3,
                        "name": "EL"
                    }
                },
                {
                    "amount": 4,
                    "food": {
                        "child_inherit_fields": [],
                        "description": "",
                        "food_onhand": false,
                        "full_name": "Erdnussöl",
                        "id": 141,
                        "ignore_shopping": false,
                        "inherit_fields": [],
                        "name": "Erdnussöl",
                        "numchild": 0,
                        "parent": null,
                        "recipe": null,
                        "substitute": [],
                        "substitute_children": false,
                        "substitute_onhand": false,
                        "substitute_siblings": false,
                        "supermarket_category": null
                    },
                    "id": 217,
                    "is_header": false,
                    "no_amount": false,
                    "note": "",
                    "order": 12,
                    "original_text": "4 EL Erdnussöl",
                    "unit": {
                        "description": null,
                        "id": 3,
                        "name": "EL"
                    }
                },
                {
                    "amount": 30,
                    "food": {
                        "child_inherit_fields": [],
                        "description": "",
                        "food_onhand": false,
                        "full_name": "Garam Massala",
                        "id": 142,
                        "ignore_shopping": false,
                        "inherit_fields": [],
                        "name": "Garam Massala",
                        "numchild": 0,
                        "parent": null,
                        "recipe": null,
                        "substitute": [],
                        "substitute_children": false,
                        "substitute_onhand": false,
                        "substitute_siblings": false,
                        "supermarket_category": null
                    },
                    "id": 218,
                    "is_header": false,
                    "no_amount": false,
                    "note": "",
                    "order": 13,
                    "original_text": "30 g Garam Massala",
                    "unit": {
                        "description": null,
                        "id": 1,
                        "name": "g"
                    }
                },
                {
                    "amount": 1,
                    "food": {
                        "child_inherit_fields": [],
                        "description": "",
                        "food_onhand": false,
                        "full_name": "Currypulver",
                        "id": 109,
                        "ignore_shopping": false,
                        "inherit_fields": [],
                        "name": "Currypulver",
                        "numchild": 0,
                        "parent": null,
                        "recipe": null,
                        "substitute": [],
                        "substitute_children": false,
                        "substitute_onhand": false,
                        "substitute_siblings": false,
                        "supermarket_category": null
                    },
                    "id": 219,
                    "is_header": false,
                    "no_amount": false,
                    "note": "",
                    "order": 14,
                    "original_text": "1 EL Currypulver",
                    "unit": {
                        "description": null,
                        "id": 3,
                        "name": "EL"
                    }
                },
                {
                    "amount": 2,
                    "food": {
                        "child_inherit_fields": [],
                        "description": "",
                        "food_onhand": false,
                        "full_name": "Kreuzkümmel",
                        "id": 122,
                        "ignore_shopping": false,
                        "inherit_fields": [],
                        "name": "Kreuzkümmel",
                        "numchild": 0,
                        "parent": null,
                        "recipe": null,
                        "substitute": [],
                        "substitute_children": false,
                        "substitute_onhand": false,
                        "substitute_siblings": false,
                        "supermarket_category": null
                    },
                    "id": 220,
                    "is_header": false,
                    "no_amount": false,
                    "note": "",
                    "order": 15,
                    "original_text": "2 TL Kreuzkümmel",
                    "unit": {
                        "description": null,
                        "id": 12,
                        "name": "TL"
                    }
                }
            ],
            "ingredients_markdown": "<p>Backofen auf 200°C, Ober- und Unterhitze vorheizen</p>",
            "ingredients_visible": true,
            "ingredients_vue": "<p>Backofen auf 200°C, Ober- und Unterhitze vorheizen</p>",
            "instruction": "Backofen auf 200°C, Ober- und Unterhitze vorheizen\n",
            "instruction_visible": true,
            "name": "",
            "order": 0,
            "show_as_header": true,
            "step_recipe": null,
            "step_recipe_data": null,
            "step_recipe_visible": false,
            "time": 0,
            "time_visible": false
        },
        {
            "file": null,
            "file_visible": false,
            "id": 79,
            "ingredients": [],
            "ingredients_markdown": "<p>Blumenkohl waschen und in Röschen schneiden</p>",
            "ingredients_visible": false,
            "ingredients_vue": "<p>Blumenkohl waschen und in Röschen schneiden</p>",
            "instruction": "Blumenkohl waschen und in Röschen schneiden\n",
            "instruction_visible": true,
            "name": "",
            "order": 1,
            "show_as_header": true,
            "step_recipe": null,
            "step_recipe_data": null,
            "step_recipe_visible": false,
            "time": 0,
            "time_visible": false
        },
        {
            "file": null,
            "file_visible": false,
            "id": 80,
            "ingredients": [],
            "ingredients_markdown": "<p>Ingwer schälen und fein reiben. Mit Joghurt, Erdnussöl, Garam Massala, Curry und Kreuzkümmel mischen. Mit Salz würzen. Blumenkohl hinzufügen und mischen.</p>",
            "ingredients_visible": false,
            "ingredients_vue": "<p>Ingwer schälen und fein reiben. Mit Joghurt, Erdnussöl, Garam Massala, Curry und Kreuzkümmel mischen. Mit Salz würzen. Blumenkohl hinzufügen und mischen.</p>",
            "instruction": "Ingwer schälen und fein reiben. Mit Joghurt, Erdnussöl, Garam Massala, Curry und Kreuzkümmel mischen. Mit Salz würzen. Blumenkohl hinzufügen und mischen.\n",
            "instruction_visible": true,
            "name": "",
            "order": 2,
            "show_as_header": true,
            "step_recipe": null,
            "step_recipe_data": null,
            "step_recipe_visible": false,
            "time": 0,
            "time_visible": false
        },
        {
            "file": null,
            "file_visible": false,
            "id": 81,
            "ingredients": [],
            "ingredients_markdown": "<p>Blumenkohl auf ein mit Backpapier belegtes Backblech legen und ca 20 Minuten im Ofen backen.</p>",
            "ingredients_visible": false,
            "ingredients_vue": "<p>Blumenkohl auf ein mit Backpapier belegtes Backblech legen und ca 20 Minuten im Ofen backen.</p>",
            "instruction": "Blumenkohl auf ein mit Backpapier belegtes Backblech legen und ca 20 Minuten im Ofen backen.\n",
            "instruction_visible": true,
            "name": "",
            "order": 3,
            "show_as_header": true,
            "step_recipe": null,
            "step_recipe_data": null,
            "step_recipe_visible": false,
            "time": 0,
            "time_visible": false
        },
        {
            "file": null,
            "file_visible": false,
            "id": 82,
            "ingredients": [],
            "ingredients_markdown": "<p>Couscous nach Packungsanleitung kochen (etwa 20 Minuten)</p>",
            "ingredients_visible": false,
            "ingredients_vue": "<p>Couscous nach Packungsanleitung kochen (etwa 20 Minuten)</p>",
            "instruction": "Couscous nach Packungsanleitung kochen (etwa 20 Minuten)\n",
            "instruction_visible": true,
            "name": "",
            "order": 4,
            "show_as_header": true,
            "step_recipe": null,
            "step_recipe_data": null,
            "step_recipe_visible": false,
            "time": 0,
            "time_visible": false
        },
        {
            "file": null,
            "file_visible": false,
            "id": 83,
            "ingredients": [],
            "ingredients_markdown": "<p>Frühlingszwiebeln in Ringe schneiden, Gurken und Tomaten würfeln. Petersilie grob hacken.</p>",
            "ingredients_visible": false,
            "ingredients_vue": "<p>Frühlingszwiebeln in Ringe schneiden, Gurken und Tomaten würfeln. Petersilie grob hacken.</p>",
            "instruction": "Frühlingszwiebeln in Ringe schneiden, Gurken und Tomaten würfeln. Petersilie grob hacken.\n",
            "instruction_visible": true,
            "name": "",
            "order": 5,
            "show_as_header": true,
            "step_recipe": null,
            "step_recipe_data": null,
            "step_recipe_visible": false,
            "time": 0,
            "time_visible": false
        },
        {
            "file": null,
            "file_visible": false,
            "id": 84,
            "ingredients": [],
            "ingredients_markdown": "<p>Zitrone auspressen. Saft mit Olivenöl und Agavendicksaft mischen. Mit Salz und Pfeffer würzen.</p>",
            "ingredients_visible": false,
            "ingredients_vue": "<p>Zitrone auspressen. Saft mit Olivenöl und Agavendicksaft mischen. Mit Salz und Pfeffer würzen.</p>",
            "instruction": "Zitrone auspressen. Saft mit Olivenöl und Agavendicksaft mischen. Mit Salz und Pfeffer würzen.\n",
            "instruction_visible": true,
            "name": "",
            "order": 6,
            "show_as_header": true,
            "step_recipe": null,
            "step_recipe_data": null,
            "step_recipe_visible": false,
            "time": 0,
            "time_visible": false
        },
        {
            "file": null,
            "file_visible": false,
            "id": 85,
            "ingredients": [],
            "ingredients_markdown": "<p>Couscous in einer Schüssel mit Petersilie, Ruccula, Gemüse und Dressing mischen. Blumenkohl dazu geben.</p>",
            "ingredients_visible": false,
            "ingredients_vue": "<p>Couscous in einer Schüssel mit Petersilie, Ruccula, Gemüse und Dressing mischen. Blumenkohl dazu geben.</p>",
            "instruction": "Couscous in einer Schüssel mit Petersilie, Ruccula, Gemüse und Dressing mischen. Blumenkohl dazu geben.",
            "instruction_visible": true,
            "name": "",
            "order": 7,
            "show_as_header": true,
            "step_recipe": null,
            "step_recipe_data": null,
            "step_recipe_visible": false,
            "time": 0,
            "time_visible": false
        }
    ],
    "updated_at": "2022-04-17T20:46:05.151624+02:00",
    "waiting_time": 0,
    "working_time": 0
}

and the respone:

{
    "keywords": [
        {},
        {
            "name": [
                "Dieses Feld darf nicht leer sein."
            ]
        },
        {}
    ]
}

Translates to: "Field cannot / is not allowed to be empty."

vabene1111 commented 2 years ago

thank you very much. That is very interesting, it seems like the importer created an empty keywords (without a name). Do you see that in the UI or is it missing ? Do you have this issue for all your imported recipes (from nextcloud?).

What you can do is go to the keywords page and see if there is an empty keyword and if so delete it or delete it from the just the recipe you posted above. If thats the case i will add a migration and fix to the next update to prevent this from happening in the future, some check must have been forgotten.

vabene1111 commented 2 years ago

ok found the responsible line of code and added a fix, if deleting the keyword from the list works easily i will not add a migration for this single case, if its more complicated we might.

floli commented 2 years ago

Do you see that in the UI or is it missing ?

Yes, I see it, can select and deselect it.

Do you have this issue for all your imported recipes (from nextcloud?).

Yes, at least for all imported recipes I checked on. So far, tried only importing from Nextcloud.

What you can do is go to the keywords page and see if there is an empty keyword and if so delete it or delete it from the just the recipe you posted above.

I deleted the empty keyword and saving the recipes now works flawlessly.

Thank you for your help!

For me, that issue can be closed.