Some bugs in the "hello world" tutorial

Hi,
I began to read the tutorial. Thank you very much for it! It is easy to read and easy to start with the tools and the step-by-step tutorial!
I made the codespace on github. OK.
I generated my app with my custom name with your generator. OK.

On editing the text of PageController.php I got some errors on my docker:

I get this error, if I remove the line:
use OCA\MYAPPNAME\AppInfo\Application;
In the tutorial, this line is missing.

The same happens with this code:

return new TemplateResponse(
            'helloworld',
            'index',
            ['myMessage' => $getParameter]
        );

I think it is because my application’s name isn’t “helloworld”. If I replace it with
Application::APP_ID
it works.

I was trying to find this project on github to open an issue, but I am not able to find it :stuck_out_tongue:

That is where the logfile is made for. Then you do not have to gues but you will find exact line of code where it derails.

You should allways have one terminal window open with the log live, while you test:

tail -f /path/to/nextcloud.log | jq

Much and good luck,
ernolf

It was just to report it.

Maybe the tutorial wasn’t updated with the new generator.

For reference:
The actual code is located in GitHub - nextcloud/app_template: A template to get started with Nextcloud app development
In order to register it, the submissions in appstore/nextcloudappstore/scaffolding at master · nextcloud/appstore · GitHub needs to be updated as well.

Christian

The template is ok.
The tutorial ( Tutorial Develop your first Hello World app.md - Nextcloud ) seems to have some different code. Like a string for the app id instead of Application::APP_ID.