Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I have an MVC4 project based on 6.1.3. I have a custom media type which I make available to a DAMP image picker by setting it as an allowed child nodetype on the Structure tab of the Folder Media Type. I do this in code with a few lines pinched from DAMP itself:
var folder = umbraco.cms.businesslogic.media.MediaType.GetByAlias("Folder");
var folderStructure = folder.AllowedChildContentTypeIDs;
var newsize = folderStructure.Count() + 1;
Array.Resize(ref folderStructure, newsize);
folderStructure[newsize - 1] = myNewMediaType.Id;
folder.AllowedChildContentTypeIDs = folderStructure;
What exactly do you mean by: "Folder child nodetype is no longer checked."
Checked in code? If so what code? What line of code is breaking for you, or where in the code that you posted do you get a different result than before?
Or are you missing a checkbox that was checked ON before and is OFF now? If so, where?
We're writing C#/MVC to set up a custom media type which uses DAMP for user-selection and an image cropper to pre-set some crops. So that the custom media type is available in the DAMP picker it needs to be checked as an allowed child node in the Structure tab of the Folder node under Media Types. With 6.1.3 I can do this using the code above, but on upgrade to 6.1.5 it gets unchecked. So the checkbox for my custom Media Type is still there, but it isn't checked.
BTW I can't do a clean 6.1.5 install as I get an 'UmbracoUser' error which I've posted about in the Getting Started/Installing Umbraco subforum. So I can't say whether this is an upgrade step defect only or is present in the upgraded codebase.
What's the link to the UmbracoUser error please?
We haven't made any changes to the MediaType class in 4 months so I'm puzzled as to why this wouldn't work any more.
The 6.1.5. clean-install issues is at http://our.umbraco.org/forum/getting-started/installing-umbraco/44511-615-Invalid-object-name-umbracoUser.
DIdn't 6.1.5 make some fixes to do wiith DAMP usage? Maybe the install script doesn't play nice with the child nodes array on the Folder node - it is a slightly obscure setting.
The "fix" we put in 6.1.5 is to make it behave like it did in 6.1.3 and is not specific to DAMP but all datatypes in general (the discovery of the bug was just first through DAMP but later narrowed down to the image cropper). So that should have nothing to do with the problem you're seeing.
I just ran your code on 6.1.5 and this is the result (see screenshot), I did not manually click anything. This is what you intend to do, correct?
Thanks for replying in detail Sebastiaan.
Yes, that is exactly what I'm trying to do. I'll see if I can find some slack time later to try again.
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted