Fix documentation issues
Closed this issue · 0 comments
Found by @reisfmb :
1 - Enonic setup
Task: Create application from starter: enonic project deploy raised errors on app-moviedb: General error during semantic analysis: Unsupported class file major version 61. Had to locally upgrade the project to gradle 7.3.1, and then could build and deploy.
3 - Next.js setup
Next.js at a glance: missing " ) " after "React framework";
Task: Configure application: ENONIC_PROJECTS=hmdb/hmdb should actually be ENONIC_PROJECTS=moviedb/hmdb since the used project name is moviedb.
6 - Preview
Task: Enable preview: the default config values on next.xp app are: url: http://127.0.0.1:3000/ and secret: mySecret. Url is fine, but mySecret does not match the default ENONIC_API_TOKEN env value on nextxp-template, which is set to mySecretKey. This imposes more work on the developer side to make preview available, i.e, setting up the com.enonic.app.nextxp.cfg config file. My suggestion is to change the default .env value on nextxp-template to mySecret.
11 - Static pages
Static pages: I think that the tip about SSR shouldn't just be a simple tip, but a dedicated section to raise more awareness;
Task: Activate prod mode: In my setup here, running npm run prod failed. I've attached the logs. It seems that on Main.tsx (the view for the main page) the code provided on the guide access props.page.regions, but it might the case that for some paths (or maybe only in my setup?!), props object does not contain the page key, which leads to accessing regions of undefined, causing errors. I could bypass that to continue with the guide by adding if(!props.page) return <></>; as the first line of the component, and got almost (or every) page statically generated.
Task: Test page invalidation: Missing spaces after "publish the changes." and also after "How does it work?".
12 - Live deployment
Didn't test yet. Will test tomorrow
13 - I18n
Task: Set up i18n: Same as point 3.b above, the project name is not hmdb, but moviedb, so it should be changed accordingly in this section. If setup by layers on language no the project name will be moviedb-no so the change on the .env variable should be: ENONIC_PROJECTS=moviedb/hmdb,no:moviedb-no/norges-hmdb
Not mentioning layers or how to test the actual internationalization?
Tested the layers locally here together with next.xp and it worked 🚀