System.StackOverflowException ContentManager.UpdateEditor

Topics: General, Troubleshooting, Writing modules
Oct 26, 2011 at 8:18 PM

Hi i'm trying to create a new ContentItem in my controller by doing:

var newTeam = _orchardServices.ContentManager.New<TeamPart>("Team");
_orchardServices.ContentManager.Create(newTeam, VersionOptions.Draft);
var model = _orchardServices.ContentManager.UpdateEditor(newTeam, this);

but i'm getting the following exception:

An unhandled exception of type 'System.StackOverflowException' occurred in App_Web_k0gritwr.dll

Does anybody know what i'm doing wrong?

Coordinator
Oct 28, 2011 at 4:39 AM

Do you know on what line? Did you try to step into it with a debugger?

Oct 28, 2011 at 12:11 PM

What parts are in that content item? It sounds like one of them is causing an infinite recursion...

Nov 2, 2011 at 8:35 PM

ok i found the problem: The IUpdateModel.TryUpdateModel method was pointing to itself in the controller!

typical mistake while running out of time lol. thanks for the support.