We have moved to GitHub Issues
Created by Markus Johansson 16 Sep 2013, 11:59:43 Updated by Shannon Deminick 01 Nov 2013, 03:46:40
In the package I'm testing with (Newsletter Studio) the configuration for the create dialogs are set set in the /umbraco/config/create/ui.xml-file
In this case it looks like this:
But when clicking the create-button the tree I get this error inside the dialog:
Server Error in '/' Application.
No delete task found for node type newsletterstudio_newsletters
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.InvalidOperationException: No delete task found for node type newsletterstudio_newsletters
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
[InvalidOperationException: No delete task found for node type newsletterstudio_newsletters] Umbraco.Web.UI.LegacyDialogHandler.GetTaskForOperation(HttpContextBase httpContext, User umbracoUser, Operation op, String nodeType) +1320 Umbraco.Web.UI.Umbraco.CreateDialog.OnLoad(EventArgs e) +213 System.Web.UI.Control.LoadRecursive() +71 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3178
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.17929
In this case the node is not removeable since it's just a container. I guess is just a matter of implementing a delete task but still this breaks backwards compatibility.
Going through the code, the error messages could be wrong, as it always displays "delete" task, even if its actually looking up the create task, fixed the error message, so it should now tell you that it cannot find the create task, which means the ui.xml config file is not correct as far as I can see atleast
looking a bit more at the code - umbraco does indeed require that you have a create or delete task in your ui.xml file, since it uses this to check for creation permissions it seems, in V6, did you use the exact same ui.xml code? seems odd that you can have a create dialog without a create task
Ahh! That explains it!
I'm using user controls for the create dialogs (old stuff that just have been around for long). My config looks like this:
This works on v4-6 (without the need to have a create-action since this is done in the user control). It's the exact same UI-config - is the usercontrol-approach is deprecated? Otherwise this would break backwards-compatability.
Something we've overlooked I think. I also think you've discovered an undocumented 'feature' of v6/4 that most people don't use.
=D Sounds true!
In my opinion this is not a really big deal. I think that the idea of using user controls in the create dialog came from looking in the source code for version 4.5 (or somerthing like that). So if your dropping the support - thats no big deal but it's still somehting that is to be concidered as a breaking change.
So let's say that I want to have a create dialog that contains something more than the textbox. How would I do that in V7?
Well keep support for it, just forgot that was even a feature :P
In v7 you'll need to create a new tree in the new tree format (legacy trees will not work with the new angular parts), then everything works based on naming conventions - or you can override these - since you'll probably want to store your views outside of the Umbraco folder in your App_Plugins/yourpackage/views folder you'll need to set some options. We haven't finalized this so will make it as easy as possible for devs - We'll probably just get you to pass in your package path and then things will be based on naming convensions/file locations.
The create menu item just launches an angular view (html) so you can do whatever you like from there.
Sounds great with the angular view! Really sounds like the way to go forward.
Assignee: Shannon Deminick
Backwards Compatible: True
Affected versions: 7.0.0
Due in version: 7.0.0