Back button on journal posts doesn't work when saved as a draft

Description of problem: If you create a draft journal post but don’t publish it, and instead save it, when you try to go back to the posts area you get a 404 not found error:

when clicked on:


https://www.inaturalist.org/posts/49842-faq-maintenance

Step 1: Make a journal post. Don’t publish it.

Step 2: Save it as a draft.

Step 3: At the top of the page, click the Back to post button.

Step 4: Error page

This is happening because the back button is linked to go to the published post, and it’s not expecting you to not have published it. I propose changing the button to take you back to the project’s journal posts, or your list of posts if you are just creating it for yourself.

1 Like

can you add screencaps?

1 Like

Oh I thought I did, that’s why there’s a colon after 404 error. One minute.

2 Likes

I haven’t been getting an error page when doing this with either my personal journal or a collection project journal, although I admit the page I am taken to is kinda confusing:

From the screenshot you shared it looks like you published it. I never published mine, just saved as a draft.

I definitely didn’t publish these posts, I just saved them as drafts and then clicked the “Back to post” link.

That’s really weird, I don’t have an explanation for what’s happening…

once you’ve saved the draft:

  1. what is the URL that shows up in your browser?
  2. if you highlight over the back link, what is that URL for the link?

(they should be almost the same, except there should be an extra /edit at the end of the URL in #1. theoretically, you could modify the URL in #1 by deleting /edit, and that should effectively take you back, too.)

ok, extra info here for context.
I am owner of the project and originally created the post, saved as draft unpublished. Then Zachary (project admin) edited the post and encountered this issue.
Project here, it’s a work in progress lol

editing to add:
the back button works fine for me.

After I save the draft, the link is the same as it was when I was editing it. If I highlight over the back link, no url shows. If I click on the back link, it takes me to https://www.inaturalist.org/posts/49842-faq-maintenance

I suppose this whole bug is because I’m editing your draft?

I guess so? Back in the first IDathon Amy and I discovered some other unexpected/undesired happenings connected to admins’ editing each others’ draft posts so I would not be surprised the code determining how that all works is not super… polished.

the back link is going to be some version of:
https://www.inaturalist.org/posts/[journal title]

on a personal journal,
the actual URL of the edit page is
https://www.inaturalist.org/journal/[user id]/[journal title]/edit
and
https://www.inaturalist.org/journal/[user id]/[journal title]
should take you back to the main journal page

on a project journal,
the actual URL of the edit page is
https://www.inaturalist.org/projects/[project slug]/journal/[journal title]/edit
and
https://www.inaturalist.org/projects/[project slug]/journal/[journal title]
should take you back to the main journal page

in other words, the back link on journal projects should be
https://www.inaturalist.org/projects/[project slug]/journal/[journal title]
instead of
https://www.inaturalist.org/posts/[journal title]

(or else the latter link needs to work for folks with permissions other than the creator of the journal.)

1 Like

I made my first journal post recently (was for me not a project but whatever). I was confused when I clicked the back button, because yes, it looked like it had published when it was just a draft. But that was the only problem I had.