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

[Panel] New Page Dialog Gives Unclear Error When Missing URL Appendix #2243

Closed
neildaniels opened this issue Oct 22, 2019 · 1 comment
Milestone

Comments

@neildaniels
Copy link
Contributor

@neildaniels neildaniels commented Oct 22, 2019

Describe the bug
When trying to create a new page in the panel, if the "URL appendix" field is empty (either because the slug rules leave it empty or you manually clear it), clicking the "Create draft" button shows this error: "A page draft with the URL appendix "" already exists"

To Reproduce
Steps to reproduce the behavior:

  1. Click "Add" button in panel
  2. Type in a title
  3. Clear out the "URL appendix" field
  4. Click "Create draft"

Expected behavior
Should say that a URL appendix is required

Screenshots
Screen Shot 2019-10-22 at 2 55 38 PM

Kirby Version
3.2.5 and 3.3.0-rc.1

Console output

[Error] Failed to load resource: the server responded with a status of 400 (Bad Request) (children, line 0)
[Error] {status: "error", message: "A page draft with the URL appendix \"\" already exists", code: 400, exception: "Kirby\\Exception\\DuplicateException", key: "error.page.draft.duplicate", …}
	(anonymous function) (app.js:1:260019)
	(anonymous function) (app.js:1:255723)
	promiseReactionJob

Desktop (please complete the following information):

  • OS: macOS 10.15
  • Browser: Safari
  • Version: 13.0.2
@bastianallgeier bastianallgeier added this to the 3.3.0 milestone Oct 23, 2019
bastianallgeier added a commit that referenced this issue Oct 23, 2019
@bastianallgeier

This comment has been minimized.

Copy link
Contributor

@bastianallgeier bastianallgeier commented Oct 23, 2019

The slug is now validated at first and a better error message is sent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants
You can’t perform that action at this time.