Skip to content

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

Description

@cjeller1592

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.

Activity

  1. thebaer commented on Mar 16, 2020

    @thebaer
    Member

    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!

  2. vince2bir commented on Apr 24, 2020

    @vince2bir

    For information, I write in french but all my apps and browser are setup in english.
    It might be nice to have a choice in the "customize" page of a blog to leave it as-is or overide it to a language of our choice.

  3. agyild commented on Jan 23, 2021

    @agyild

    I have already written in the forum but it's been nearly year since this issue was reported. I think at this point it would be better if one of the active developers implemented this fix if it is so simple instead of waiting for a new contributor.

  4. added this to the 0.13 milestone on Apr 6, 2021
  5. added a commit that references this issue on Apr 6, 2021
    02490c7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions