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

Creating a post with title "meta" leads to errors #278

Open
idelem opened this issue Mar 12, 2020 · 2 comments
Open

Creating a post with title "meta" leads to errors #278

idelem opened this issue Mar 12, 2020 · 2 comments
Labels

Comments

@idelem
Copy link

idelem commented Mar 12, 2020

Describe the bug

I created a post with the title "meta" and published it to a blog. It redirects to xxxxx.com/blogname/meta and says

This page is missing.
Are you sure it was ever here?

But the post is displayed properly in the blog's post list. Then I tried pinning it. It was pinned successfully, only that the link directs me to the same missing page. I tried to unpin the page through xxxxx.com/blogname/meta/unpin. This attempt failed also. Fortunately, I was able to use the link xxxxx.com/blogname/meta/edit and editted the post's metadata, changing its slug to something else.

Steps to reproduce (if necessary)

Steps to reproduce the behavior:

  1. Go to 'New Post'
  2. Type # meta
  3. Click on 'Publish'

Expected behavior

Not sure. I think either it's a bug, or the user is not supposed to create a post named "meta".

Application configuration

  • Single mode or Multi-user mode? Multi-user mode
  • Database? sqlite
  • Open registration? no
  • Federation enabled? yes

Version or last commit: 0.11.2

@cjeller1592
Copy link
Contributor

I was able to replicate this too. My understanding is that /meta is reserved for editing the metadata of posts. So if you were editing the metadata on a post, the route on your instance would be example.com/post/edit/meta. This is why I think it's pulling up an error - so more in line with the "user is not supposed to create a post named 'meta'" explanation.

Maybe @thebaer can give more clarification.

@thebaer thebaer added this to the 0.12 milestone Mar 15, 2020
@thebaer thebaer added the bug label Mar 15, 2020
@thebaer
Copy link
Member

thebaer commented Mar 15, 2020

Thanks for the report, @idelem -- and for looking into this, @cjeller1592! This is a definitely bug. I believe it only affects multi-user instances, and is caused by reserved routes for our draft endpoints that conflict with our blog endpoints. See: https://github.com/writeas/writefreely/blob/f126ac624a03a3e2e5936eb8c2ab33109d34b055/routes.go#L184-L185

I think one solution would be moving these under the /d/ path, just like we already do for single-user instances. Ideally we'd also make it consistent with our collection editing paths -- so /d/{action}/edit/meta instead of /{action}/meta.

@thebaer thebaer removed this from the 0.12 milestone Mar 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

3 participants