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

"load templates" error message doesn't provide sufficient information to resolve it #757

Open
reiver opened this issue Sep 11, 2023 · 1 comment

Comments

@reiver
Copy link

reiver commented Sep 11, 2023

Describe the bug

If you run the writefreely binary, and you don't have the templates/ or pages/ directories, which both contain .tmpl files, then you get this error message:

main.go:120: load templates: lstat pages: no such file or directory

The error message does not tell you what file or directory is actually missing.

And it is not clear what the user should do to resolve this.

Steps to reproduce (if necessary)

Steps to reproduce the behavior:

  1. Run the writefreely binary without the templates/ and pages/ directories.

Expected behavior

The error message should be more informative:

main.go:120: load templates: the directory for the 'pages/' templates does not exist — should have been at "/the/absolute/path/to/pages"

main.go:120: load templates: the directory for the 'templates/' templates does not exist — should have been at "/the/absolute/path/to//templates"

Application configuration

  • Single mode or Multi-user mode?
  • Database? [mysql/sqlite]
  • Open registration? [yes/no]
  • Federation enabled? [yes/no]

Version or last commit:

f247479

@maphew
Copy link

maphew commented Jan 22, 2024

This was probable cause of #234. In addition to a better error message, instructions for how to resolve could be added to docs somewhere. Example recipe: #234 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

3 participants