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

default text not loaded when using direct URL note creation #1414

Closed
fmichonneau opened this issue Feb 24, 2020 · 2 comments
Closed

default text not loaded when using direct URL note creation #1414

fmichonneau opened this issue Feb 24, 2020 · 2 comments
Labels
bug Something isn't working

Comments

@fmichonneau
Copy link

If there is content in the ./public/default.md file, creating a new note by clicking on the "New" button in the navigation bar correctly creates a new note pre-filled with the content of the default file. However, when creating a new note by directly accessing a URL (using CMD_ALLOW_FREEURL=true), the note is blank and doesn't contain the default content.

@jackycute
Copy link
Member

jackycute commented Feb 24, 2020

Hi @fmichonneau,
Thanks for reporting to us.

I traced the code and found that the free url actually finds the corresponding docs file in the public path (like /test will find /public/docs/test.md) and tries to put the content from the file.
Since the file doesn't exist in this case, it didn't catch it and ignore to get the content from default md. I think this might be a bug.
See code here:
https://github.com/hackmdio/codimd/blob/develop/lib/models/note.js#L100

@jackycute jackycute added the bug Something isn't working label Feb 27, 2020
@jackycute
Copy link
Member

Fixed by #1674

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

No branches or pull requests

2 participants