Changing direction back to left-to-right

Once a post’s direction is set to “right-to-left”, it can not be changed back to “left-to-right”.

  • Product (e.g. Write.as, Snap.as , etc.):
    Write.as

  • Platform (e.g. website, Android, iOS, Chrome OS, Chrome, Firefox)
    Website

  • Screenshots, if it demonstrates the problem
    writeas-1

  • What happened
    I was playing around with post direction, toggling right to left option worked, but could not revert it. Page keeps showing “Changes saved” but nothing really happens, the check next to “right to left” just does not go away, and the post direction never changes back.

  • Any steps you took before the bug appeared, if it’s not something obvious
    No. Tried it a couple of times, always the same behaviour.

  1. Write a post
  2. Publish it
  3. Click Edit next to logo
  4. Click on “Edit post metadata”
  5. Toggle direction option. This should work
  6. Try to toggle it again, never goes away.
1 Like

Nice catch! I am getting the same problem too. Perhaps it is something on the server end.

There is a way to get a post back to “left-to-right”. It involves working with the API and a little bit of command line. I would be glad to share it but wasn’t sure how urgent the matter is or if it’d soon be made redundant when @matt finds the fix.

Thanks for reporting this, @cenrak – I’ve just opened issue #103 on GitHub to track it.

@cjeller1592, I’d like to hear how you work around it – mostly to know whether this is only a bug with the web app or with the API, as well.

@matt, the work around was making an ‘update post’ request to the API. Here is an example of the request with an anonymous post I had stuck on ‘rtl’:

curl "https://write.as/api/posts/pp13llvdlrvwfrny"  
 -H "Authorization: Token 00000000-0000-0000-0000-0000000000000000"  
 -H "Content-Type: application/json"   
-X POST   
-d '{"rtl": false}'

The post went back to normal with this. My thinking is that it’s a bug with the web app.

1 Like

I’ve just replied to the github issue with the fix.

Basically, unchecked boxes are not sent in http requests. You could verify that by capturing HTTP request header. To fix this, you just need to check if its value in http header is set (true) or unset (false), not its value (true or false).

1 Like

thank you