1

Closed

Editor Parts hidden in placement.info are updated with empty data

description

Steps to reproduce:

placement.info:
<Place Parts_Roles_UserRoles_Edit="-"/>

_contentManager.BuildEditor(_orchardServices.WorkContext.CurrentUser.ContentItem)

then on POST

_contentManager.UpdateEditor(_orchardServices.WorkContext.CurrentUser, this);

results in removing the user from ALL roles he was in before..
Closed Aug 13, 2013 at 7:21 AM by BertrandLeRoy

comments

BertrandLeRoy wrote Aug 12, 2013 at 9:19 PM

That sounds expected. If you don't want a part, you should remove it, not just hide it. The driver can't know what you put in placement.

x0r wrote Aug 12, 2013 at 9:59 PM

Fair enough, but still.. the BuildEditor does... Is there a way to utilize the BuildEditor (drivers) and create an edit form, besides manually writing the complete thing? Maybe calling the buildeditor for each wanted part of contentitem? (don't know if that's possible, just thinking....)
Thank you

x0r wrote Aug 12, 2013 at 10:05 PM

Another idea based on one of your cool articles.

Could you do this:
http://weblogs.asp.net/bleroy/archive/2013/02/13/easy-content-templates-for-orchard-take-2.aspx

with the editor parts? Actually i tried it and couldn't make it work...

BertrandLeRoy wrote Aug 12, 2013 at 11:36 PM

Can we move that to discussions where it seems to belong? I think I should close this bug.

Jetski5822 wrote Aug 16, 2013 at 9:57 AM

This actually sounds like a regression issue.

BertrandLeRoy wrote Aug 16, 2013 at 11:00 PM

How so?