nextcloud / nextcloud/cookbook
"Call to undefined method OCA\\Cookbook\\Service\\RecipeService::getVisibleInfoBlocks()" error when opening the cookbook overview
Nobody has claimed this yet.
- Dominant language
- HTML
- Stars
- 641
- Forks
- 113
- Avg merge
- 21h 31m
- Merged PRs (30d)
- 26
Description
Description
Since the last upgrade (To Nextcloud 26) I see an error when opening the cookbook app on the web. When I close the error message it looks like everything works fine.
Reproduction
Steps to reproduce the behavior:
- Open the cookbook app
- See error

In the server logs, there is this error:
{
"reqId": "xmgFtMLBQ6IkLFsQ0yKj",
"level": 3,
"time": "2023-04-04 07:40:52",
"remoteAddr": "192.168.192.10",
"user": "konrad",
"app": "index",
"method": "GET",
"url": "/apps/cookbook/webapp/config",
"message": "Call to undefined method OCA\\Cookbook\\Service\\RecipeService::getVisibleInfoBlocks() in file '/var/www/html/custom_apps/cookbook/lib/Controller/Implementation/ConfigImplementation.php' line 48",
"userAgent": "Mozilla/5.0 (X11; Linux x86_64; rv:107.0) Gecko/20100101 Firefox/107.0",
"version": "26.0.0.11",
"exception": {
"Exception": "Exception",
"Message": "Call to undefined method OCA\\Cookbook\\Service\\RecipeService::getVisibleInfoBlocks() in file '/var/www/html/custom_apps/cookbook/lib/Controller/Implementation/ConfigImplementation.php' line 48",
"Code": 0,
"Trace": [
{
"file": "/var/www/html/lib/private/AppFramework/App.php",
"line": 183,
"function": "dispatch",
"class": "OC\\AppFramework\\Http\\Dispatcher",
"type": "->",
"args": [
[
"OCA\\Cookbook\\Controller\\ConfigController"
],
"list"
]
},
{
"file": "/var/www/html/lib/private/Route/Router.php",
"line": 315,
"function": "main",
"class": "OC\\AppFramework\\App",
"type": "::",
"args": [
"OCA\\Cookbook\\Controller\\ConfigController",
"list",
[
"OC\\AppFramework\\DependencyInjection\\DIContainer"
],
[
"cookbook.config.list"
]
]
},
{
"file": "/var/www/html/lib/base.php",
"line": 1055,
"function": "match",
"class": "OC\\Route\\Router",
"type": "->",
"args": [
"/apps/cookbook/webapp/config"
]
},
{
"file": "/var/www/html/index.php",
"line": 36,
"function": "handleRequest",
"class": "OC",
"type": "::",
"args": []
}
],
"File": "/var/www/html/lib/private/AppFramework/Http/Dispatcher.php",
"Line": 169,
"Previous": {
"Exception": "Error",
"Message": "Call to undefined method OCA\\Cookbook\\Service\\RecipeService::getVisibleInfoBlocks()",
"Code": 0,
"Trace": [
{
"file": "/var/www/html/custom_apps/cookbook/lib/Controller/ConfigController.php",
"line": 30,
"function": "list",
"class": "OCA\\Cookbook\\Controller\\Implementation\\ConfigImplementation",
"type": "->",
"args": []
},
{
"file": "/var/www/html/lib/private/AppFramework/Http/Dispatcher.php",
"line": 230,
"function": "list",
"class": "OCA\\Cookbook\\Controller\\ConfigController",
"type": "->",
"args": []
},
{
"file": "/var/www/html/lib/private/AppFramework/Http/Dispatcher.php",
"line": 137,
"function": "executeController",
"class": "OC\\AppFramework\\Http\\Dispatcher",
"type": "->",
"args": [
[
"OCA\\Cookbook\\Controller\\ConfigController"
],
"list"
]
},
{
"file": "/var/www/html/lib/private/AppFramework/App.php",
"line": 183,
"function": "dispatch",
"class": "OC\\AppFramework\\Http\\Dispatcher",
"type": "->",
"args": [
[
"OCA\\Cookbook\\Controller\\ConfigController"
],
"list"
]
},
{
"file": "/var/www/html/lib/private/Route/Router.php",
"line": 315,
"function": "main",
"class": "OC\\AppFramework\\App",
"type": "::",
"args": [
"OCA\\Cookbook\\Controller\\ConfigController",
"list",
[
"OC\\AppFramework\\DependencyInjection\\DIContainer"
],
[
"cookbook.config.list"
]
]
},
{
"file": "/var/www/html/lib/base.php",
"line": 1055,
"function": "match",
"class": "OC\\Route\\Router",
"type": "->",
"args": [
"/apps/cookbook/webapp/config"
]
},
{
"file": "/var/www/html/index.php",
"line": 36,
"function": "handleRequest",
"class": "OC",
"type": "::",
"args": []
}
],
"File": "/var/www/html/custom_apps/cookbook/lib/Controller/Implementation/ConfigImplementation.php",
"Line": 48
},
"CustomMessage": "--"
}
}
Running in docker with the latest image.
Expected behavior
No error message.
Actual behavior
Error message appears-
Browser
Firefox 107
Versions
Nextcloud server version: 26.0.0
Cookbook version: 0.10.2
Database system: MariaDB
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with lib/Controller/Implementation/ConfigImplementation.php at line 48 and follow the call from lib/Controller/ConfigController.php line 30 to RecipeService. Reproduce the request at /apps/cookbook/webapp/config and verify that opening the cookbook overview no longer produces the undefined-method error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- mariadb, php
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100