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

After creation of an item, I get editView with no item ID #838

Closed
KonstantinYegupov opened this issue Dec 9, 2015 · 4 comments
Closed

Comments

@KonstantinYegupov
Copy link

After I have finished creating an item, I am redirected neither to the item list page, nor to a new "create item page", but to an edit page with no item ID selected (URL /#/users/edit/).

This is very surprising. Why does such thing as an empty edit view exist at all? And why am I redirected there?

Could not find anything in the documentation - https://github.com/marmelab/ng-admin/blob/master/doc/reference/View.md only has detailed settings for listView.

Running Angular 1.4 btw, maybe that has something to do with it.

@fzaninotto
Copy link
Member

ng-admin is not yet compatible with Angular 1.4 (refs #567). However, I don't think that the problem comes from that. What is the REST response to the POST request sending the newly created page? It's supposed to contain the created object, with an identifier value.

@KonstantinYegupov
Copy link
Author

Ah. I feel like the expectation for POST to return the entity should be documented somewhere. And, moreover, it'd be nice for ng-admin to handle missing entity ID gracefully, rather than showing a completely wrong page.

Editing item immediately after its creation seems like not the most popular use case. Maybe creationView should be configurable to allow going to the items list or to "create another" screen?

@daniel-rosiak
Copy link

@KonstantinYegupov did you manage to solve this issue somehow? I would like to redirect to list instead of edition too.

@fzaninotto
Copy link
Member

#898 now allows custom hook after creation. Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants