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

Adding blog post to not saved draft of a new archive causes exception #321

Closed
rengert opened this issue Jun 28, 2018 · 0 comments
Closed
Assignees
Milestone

Comments

@rengert
Copy link
Contributor

rengert commented Jun 28, 2018

How to reproduce:

  • Create a new archive page (only create it and give it a name)
  • Create a blog post in it

The manager is redirected to the following url:

http://localhost:5311/manager/post/add/BlogPost/00000000-0000-0000-0000-000000000000

I guess the guid should be the guid of the archive page, but the guid does not exists, because the draft is net saved yet.

Exception is:

KeyNotFoundException: No post type found with the id 'BlogPost'
Piranha.Areas.Manager.Services.PostEditService.Create(string postTypeId, Guid blogId)
Piranha.Areas.Manager.Controllers.PostController.Add(string type, Guid blogId)

I would suggest to disable the button and display the message to save the draft first.

@tidyui tidyui added this to the Version 5.1 milestone Jun 28, 2018
@tidyui tidyui self-assigned this Jul 2, 2018
@tidyui tidyui closed this as completed in c1deea1 Jul 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants