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

Post titled "Tags" cannot be edited #305

Closed
cjeller1592 opened this issue Apr 27, 2020 · 4 comments · Fixed by #397
Closed

Post titled "Tags" cannot be edited #305

cjeller1592 opened this issue Apr 27, 2020 · 4 comments · Fixed by #397

Comments

@cjeller1592
Copy link
Contributor

Describe the bug

When you create a post titled "Tags" & go to edit the page, you get a 404: "This Page Is Missing. Are you sure it was ever here?".

Expected behavior

Should be able to go in and edit the post.

Version or last commit:
v0.12

@Crocmagnon
Copy link

Crocmagnon commented May 15, 2020

An easy fix may be to prevent using « tags » as a slug? In the slug generation function, check if « tags » is used then just add a dash or something.
If the user tried to use « tags », prevent it and display a helpful error message.

@thebaer
Copy link
Member

thebaer commented Jul 23, 2020

This bug is caused by this route: https://github.com/writeas/writefreely/blob/24fa3d6863ab6a3047c8bbe75203efb09ce7b894/routes.go#L207

The application assumes "edit" is the tag, and since it doesn't find any posts with #edit in them, it fails. Here are two ways I could think of to fix this:

  • Drop this route entirely, since we don't officially use it anyway, or
  • Add a special "/tags/edit" route here that uses the correct handler function

Any thoughts?

@cjeller1592
Copy link
Contributor Author

If the route isn't officially used anyway, I'd say drop it entirely. Would there be any other repercussions to removing that route that you can think of @thebaer?

@thebaer
Copy link
Member

thebaer commented Aug 10, 2020

Nope, we can drop it.

mrvdb added a commit to mrvdb/writefreely that referenced this issue Oct 3, 2020
@thebaer thebaer linked a pull request Oct 3, 2020 that will close this issue
@thebaer thebaer added this to the 0.13 milestone Oct 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.

3 participants