Skip to content

Cookbook 0.7.9 on NC 19.0.6: Can not save recipe #523

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

Closed
Kieltux opened this issue Jan 16, 2021 · 9 comments · Fixed by #524
Closed

Cookbook 0.7.9 on NC 19.0.6: Can not save recipe #523

Kieltux opened this issue Jan 16, 2021 · 9 comments · Fixed by #524
Labels
bug Something isn't working

Comments

@Kieltux
Copy link

Kieltux commented Jan 16, 2021

After update to 0.7.9 I can not save a recipe anymore.
Disabled the app, removed the app and installed again. Nothing changed.

Reproduction
Steps to reproduce the behavior:

  1. Create a recipe
  2. Add some things
  3. Save the new recipe (click on "Save Changes")
  4. Error Message: "Recipe could not be saved"

Expected behavior
A new recipe saved in Nextcloud

Screenshots
grafik

Browser
Firefox 78.6.1 ESR
Opera 73.0.3856.344

Versions
Nextcloud server version: 19.0.6
Cookbook version: 0.7.9

I get this in the NC Logs:

Exception: Call to undefined function OCA\Cookbook\Helper\str_starts_with()

    /var/www/vhosts/nextcloud-server/httpdocs/lib/private/AppFramework/App.php - line 137:

    OC\AppFramework\Http\Dispatcher->dispatch(OCA\Cookbook ... {}, "create")

    /var/www/vhosts/nextcloud-server/httpdocs/lib/private/AppFramework/Routing/RouteActionHandler.php - line 47:

    OC\AppFramework\App::main("OCA\\Cookbo ... r", "create", OC\AppFramew ... {}, { _route: "c ... "})

    <<closure>>

    OC\AppFramework\Routing\RouteActionHandler->__invoke({ _route: "c ... "})

    /var/www/vhosts/nextcloud-server/httpdocs/lib/private/Route/Router.php - line 297:

    call_user_func(OC\AppFramew ... {}, { _route: "c ... "})

    /var/www/vhosts/nextcloud-server/httpdocs/lib/base.php - line 1010:

    OC\Route\Router->match("/apps/cookbook/api/recipes")

    /var/www/vhosts/nextcloud-server/httpdocs/index.php - line 37:

    OC::handleRequest()

Verursacht durchError: Call to undefined function OCA\Cookbook\Helper\str_starts_with()

    /var/www/vhosts/nextcloud-server/httpdocs/apps/cookbook/lib/Helper/RestParameterParser.php - line 36:

    OCA\Cookbook\Helper\RestParameterParser->getEncoding("application ... 8")

    /var/www/vhosts/nextcloud-server/httpdocs/apps/cookbook/lib/Controller/RecipeController.php - line 119:

    OCA\Cookbook\Helper\RestParameterParser->getParameters()

    /var/www/vhosts/nextcloud-server/httpdocs/lib/private/AppFramework/Http/Dispatcher.php - line 170:

    OCA\Cookbook\Controller\RecipeController->create()

    /var/www/vhosts/nextcloud-server/httpdocs/lib/private/AppFramework/Http/Dispatcher.php - line 100:

    OC\AppFramework\Http\Dispatcher->executeController(OCA\Cookbook ... {}, "create")

    /var/www/vhosts/nextcloud-server/httpdocs/lib/private/AppFramework/App.php - line 137:

    OC\AppFramework\Http\Dispatcher->dispatch(OCA\Cookbook ... {}, "create")

    /var/www/vhosts/nextcloud-server/httpdocs/lib/private/AppFramework/Routing/RouteActionHandler.php - line 47:

    OC\AppFramework\App::main("OCA\\Cookbo ... r", "create", OC\AppFramew ... {}, { _route: "c ... "})

    <<closure>>

    OC\AppFramework\Routing\RouteActionHandler->__invoke({ _route: "c ... "})

    /var/www/vhosts/nextcloud-server/httpdocs/lib/private/Route/Router.php - line 297:

    call_user_func(OC\AppFramew ... {}, { _route: "c ... "})

    /var/www/vhosts/nextcloud-server/httpdocs/lib/base.php - line 1010:

    OC\Route\Router->match("/apps/cookbook/api/recipes")

    /var/www/vhosts/nextcloud-server/httpdocs/index.php - line 37:

    OC::handleRequest()
@Kieltux Kieltux added the bug Something isn't working label Jan 16, 2021
@christianlupus
Copy link
Collaborator

I am sorry, the str_starts_with is PHP 8. I will prepare a quick fix as this affects all changes to the app.

@christianlupus
Copy link
Collaborator

@Kieltux would you be willing and able to test a version before I push it out?

@Kieltux
Copy link
Author

Kieltux commented Jan 16, 2021

@christianlupus Yes, of course.

Applied #524 at cookbook 0.7.9 and now I can save new recipes and also edit existing recipes again.
NC 19.0.6 with PHP7.4.

Thank you, LGTM.

@christianlupus
Copy link
Collaborator

OK, stay tuned. In a few minutes, I can provide you a link to download a fixed version. If it works I will throw out a version 0.7.10 as this affects all non-GET access to the app and is therefore critical.

@christianlupus
Copy link
Collaborator

christianlupus commented Jan 16, 2021

@Kieltux Here is the link: https://github.com./nextcloud/cookbook/suites/1842260044/artifacts/35654958

Unpack it twice and use it as a replacement for the current app in the NC installation under /apps/ or /custom_apps.

Please tell me your results. Thanks!

@Kieltux
Copy link
Author

Kieltux commented Jan 16, 2021

@christianlupus Replaced the patched Cookbook 0.9.7 with the version from the link.
Everything works (creating new recipes, editing existing recipes).

Looks good, thank you.

@christianlupus
Copy link
Collaborator

You should update to 0.7.10. Ity contains these changes.

@Kieltux
Copy link
Author

Kieltux commented Jan 16, 2021

Updated my two NC 19.06 and 19.07 to cookbook 0.7.10 and everything fine.
Thank you for your support and of course for cookbook.

@poltrian
Copy link

I would say "thank you" all is fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants