anchor-cms
anchor-cms copied to clipboard
Trying to save a post without title or with only number in title hangs
Summary
When adding new post, cursor is positioned in the body of the post and user can quickly forget to add title. If you try to save the post without title or just with numbers in title, you get "Saving..." and everything hangs
Expected Behaviour
- Save the post without title or with number only, or tell me that I have to enter one
Actual Behaviour
- Page hangs while saving
Context details (if applicable)
- Anchor version: 0.12.3
- Server setup: Apache 2.4.25
@b4d
I'll check this out for you!
@CraigChilds94
Cool, thanks! If you need more info, here I am!
Hey there.
I recently ran into this issue while using Anchor and trying to create a blog post titled "2017".
So I thought I'd do some investigating and found the following problems:
When adding a new post:
- Validation is happening to check that both the title and slug are at least 3 characters long.
- It also checks that the slug is not numeric
If these things happen, there doesn't seem to be any error handling, so the page hangs.
Potential ways to fix this would be to reduce the limit of a minimum 3 characters on title + slug, and remove the limit on no numeric characters in slug. Alternatively, we could introduce some message back to the user to correct the issues and comply with the current validation.
I'd like to help by making a contribution, but these limitations in the validation have obviously been added for a reason, so if anyone has any info on why they are in place and the best method to fix this issue, it would be greatly appreciated.
Thanks :)
@pixeldrift64 @b4d Sorry I've not had a chance to get around to this yet, I'll look into why the validation is setup this way and see if we can lift the non-numeric or improve our validation errors messages so that the users have an idea of why it's not working :)
Still have no fix for the bug. We need it =)