mealie-recipes / mealie

Mealie is a self hosted recipe manager and meal planner with a RestAPI backend and a reactive frontend application built in Vue for a pleasant user experience for the whole family. Easily add recipes into your database by providing the url and mealie will automatically import the relevant data or add a family recipe with the UI editor
https://docs.mealie.io
GNU Affero General Public License v3.0
5.59k stars 608 forks source link

Comments lost after editing recipe #3766

Closed cdcastlerock closed 1 week ago

cdcastlerock commented 1 week ago

First Check

What is the issue you are experiencing?

After editing a recipe comments are lost for that recipe.

Steps to Reproduce

1) comment on a recipe 2) edit the recipe and hit save 3) comment is gone

Please provide relevant logs

[INFO|httptools_impl|L466] 2024-06-21T11:16:24: 10.27.27.43:56042 - "GET /api/organizers/tools?page=1&perPage=-1&orderBy=name&orderDirection=asc HTTP/1.1" 200 [INFO|httptools_impl|L466] 2024-06-21T11:16:24: 10.27.27.43:56042 - "GET /api/recipes?page=1&perPage=64&orderBy=created_at&orderDirection=desc&paginationSeed=1718986584408&searchSeed=1718986584408&search=pork&requireAllCategories=false&requireAllTags=false&requireAllTools=false&requireAllFoods=false HTTP/1.1" 200 [INFO|httptools_impl|L466] 2024-06-21T11:16:24: 10.27.27.43:56042 - "GET /api/users/self/ratings HTTP/1.1" 200 [INFO|httptools_impl|L466] 2024-06-21T11:16:28: 10.27.27.43:56042 - "GET /api/recipes/pulled-pork HTTP/1.1" 200 [INFO|httptools_impl|L466] 2024-06-21T11:16:28: 10.27.27.43:56042 - "GET /api/media/recipes/5b288114-4b5d-461d-b381-4c8570f347a4/images/original.webp?rnd=1&version=https://southernladymagazine.com/wp-content/uploads/2014/08/BBQ429MBS-1024x1024.jpg HTTP/1.1" 200 [INFO|httptools_impl|L466] 2024-06-21T11:16:28: 10.27.27.43:56042 - "GET /api/users/self/ratings HTTP/1.1" 200 [INFO|httptools_impl|L466] 2024-06-21T11:16:28: 10.27.27.43:56044 - "GET /api/recipes/pulled-pork/comments HTTP/1.1" 200 [INFO|httptools_impl|L466] 2024-06-21T11:16:28: 10.27.27.43:56043 - "GET /api/organizers/tools?page=1&perPage=-1&orderBy=name&orderDirection=asc HTTP/1.1" 200 [INFO|httptools_impl|L466] 2024-06-21T11:16:40: 10.27.27.43:56045 - "POST /api/comments HTTP/1.1" 201 [INFO|httptools_impl|L466] 2024-06-21T11:16:46: 10.27.27.43:56046 - "GET /api/organizers/tools?page=1&perPage=-1&orderBy=name&orderDirection=asc HTTP/1.1" 200 [INFO|httptools_impl|L466] 2024-06-21T11:16:50: 127.0.0.1:39372 - "GET /api/app/about HTTP/1.1" 200 [INFO|httptools_impl|L466] 2024-06-21T11:16:58: 10.27.27.43:56047 - "PUT /api/recipes/pulled-pork HTTP/1.1" 200 [INFO|httptools_impl|L466] 2024-06-21T11:16:58: 10.27.27.43:56047 - "GET /api/recipes/pulled-pork/comments HTTP/1.1" 200 [INFO|httptools_impl|L466] 2024-06-21T11:16:58: 10.27.27.43:56049 - "GET /api/users/self/ratings HTTP/1.1" 200 [INFO|httptools_impl|L466] 2024-06-21T11:16:58: 10.27.27.43:56048 - "GET /api/organizers/tools?page=1&perPage=-1&orderBy=name&orderDirection=asc HTTP/1.1" 200

Mealie Version

Version: v1.9.0 (also happened with v1.8.0) Build: d96c36333b9cb9461c5dee96ae28b60d912b38fd

Deployment

Docker (Linux)

Additional Deployment Details

my docker compose file: version: "3.1" services: mealie: container_name: mealie image: hkotel/mealie:latest restart: always ports:

Kuchenpirat commented 1 week ago

Hey thanks for raising this too us!

Can confirm that comments seem to disappear after editing a recipe.

Some side note: after adding a comment then editing the comment disappeared. When I did the same again the comment stayed.

michael-genson commented 1 week ago

Seems to be a state issue. If you add the comment, then refresh the page, it works fine. But, if you add the comment, then make an edit, the frontend sends an empty list of comments.