Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'prepTime', 'cookTime' and 'totalTime' attributes are not read from recipe in JSON-LD #1749

Closed
shagn opened this issue Jul 7, 2023 · 0 comments · Fixed by #1871
Closed
Assignees
Labels
Backend Issue or PR related to the backend code bug Something isn't working php Pull requests that update Php code

Comments

@shagn
Copy link
Contributor

shagn commented Jul 7, 2023

Hey,

thanks for creating this app :)

When starting to import recipes from URLs in the app, I found a small issue. I wasn't sure if it should be a 'Website support' issue instead, but since the website is generally working, I opted for bug.

Description
When importing this recipe, the attributes 'prepTime', 'cookTime' and 'totalTime' are not imported despite being present and well formatted in the JSON-LD.

The same happened when trying with this recipe which is used as test case J for the JSON-LD parser. But if I see that correctly, the expected JSON output for this test case should contain the correct time attributes e.g. "prepTime": "PT15M".

Expected behavior
When the time attributes in the "Recipe" type are present and well formatted, they should also be parsed.

Actual behavior
The imported html contains the time attribute e.g.: <script type="application/ld+json">{"@context":"http:\/\/schema.org","@type":"Recipe",[...]"prepTime":"PT15M",..., but in the resulting recipe.json the time attributes are set to null: "prepTime": null.

Reproduction
Steps to reproduce the behavior:

  1. Import recipe from URL
  2. Enter https://www.kuechengoetter.de/rezepte/bananenquark-mit-nuessen-63235 or https://www.allrecipes.com/recipe/223042/chicken-parmesan/
  3. Check if 'prepTime' is equal to "PT15M" in import.html
  4. Check if 'prepTime' is null in recipe.json

Browser
Brave Version 1.52.129 Chromium: 114.0.5735.198 (Official Build) (x86_64)

Versions
Nextcloud server version: 26.0.3
Cookbook version: 0.10.2
Database system: Mysql 10.5.21

@shagn shagn added the bug Something isn't working label Jul 7, 2023
@christianlupus christianlupus added this to the Release 0.10.3 milestone Oct 29, 2023
@christianlupus christianlupus added php Pull requests that update Php code Backend Issue or PR related to the backend code labels Oct 29, 2023
@seyfeb seyfeb self-assigned this Oct 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Backend Issue or PR related to the backend code bug Something isn't working php Pull requests that update Php code
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants