You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The /write/ url is unique in that it requires the full path to the guide including the publish_status. This means the 'edit this guide' sidebar link can point the user to a bad URL on the first load after changing the publish status. To reproduce this do the following:
Create new guide
Change publish status from 'draft' to 'in-review'
Now immediately click the 'edit this guide' link in the sidebar
This will likely fail to find your guide and load the default information in the editor.
There's a race condition here actually in that if the celery task to change the publish status is not done yet things will work. However, that almost never happens in practice.
The text was updated successfully, but these errors were encountered:
Other URLs use the status as a query string argument and automatically check all possible publish_status option in an intelligent order. We should probably do the same thing for views.write and api.api_save. The idea being we just pass the stack/title pair and find the guide in it's current location, then update that.
Technically there's still a race condition if we try to save a guide while the publish status task is pending or in the process of running. However, that's much more difficult to fix so we should make the easy change first.
- Related to #70.
- This mostly improves the following scenario:
- Author creates new guide
- Author immediately moves guide to 'in-review'
- Author notices a typo and immediately clicks 'edit this guide'
- We might fetch the guide 'path' BEFORE we've finished moving it to
'in-review' so we'll try to write the 'draft' path first, which could
fail if the move finishes before they hit submit.
- Previously author would be kicked back to the homepage.
- Now author gets redirected back to write page, which triggers a new read
of the guide, hopefully with the updated path.
- This doesn't completely fix the above scenario because the second save could
still have the same problem. However, it sends the author back to a more
logical place.
The
/write/
url is unique in that it requires the full path to the guide including thepublish_status
. This means the 'edit this guide' sidebar link can point the user to a bad URL on the first load after changing the publish status. To reproduce this do the following:The text was updated successfully, but these errors were encountered: