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

Language metadata gets reset to English after editing a post #280

cjeller1592 opened this issue Mar 16, 2020 · 1 comment

Language metadata gets reset to English after editing a post #280

cjeller1592 opened this issue Mar 16, 2020 · 1 comment


Copy link

@cjeller1592 cjeller1592 commented Mar 16, 2020

Brought up originally on the forum:

Normally, after setting a language for a post, it should stick and should not change unless the author modifies it again. However if you edit the post and (re)publish it again it causes the language field to reset back to English.

Steps to reproduce

  1. Go to a post and click 'Edit.' Go into the metadata and change the Language to something else and save your changes. Publish the post.
  2. Now edit the post again, this time the body of the post, and publish.
  3. Go back to the metadata of the post. Note how it is now 'English.'

Expected behavior

Post should keep the metadata language after edited, not revert to English.


This comment has been minimized.

Copy link

@thebaer thebaer commented Mar 16, 2020

Thanks for copying that over. Off the top of my head, this happens because we include the lang parameter every time we publish or update a post, which passes along the browser's default language (which is likely English in this user's case).

The fix should be simple: in templates/pad.tmpl, only pass lang when initially creating a post. When editing / updating a post, don't pass the lang parameter.

Since this is pretty straightforward, this would be a great first task for anyone interested in contributing to WriteFreely!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.