This project is read-only.


Topics: Writing modules
Jul 12, 2013 at 7:57 PM
Edited Jul 12, 2013 at 7:59 PM
EDIT: Arg... sorry for the horrible subject... guess I can't edit the subject, just the body of the post in CodePlex. :( Issue is what dependences are there for the ContentManager.BuildDisplay() method. Looking at the source having trouble identifying it.

First, I know I am not understanding the requirements of the Services.ContentManager.BuildDisplay() method, I just can't figure out what I'm missing.

I'm creating a 1-many relationship in a custom module... very much like how the Orchard.Blogs module works (Blog(1) > (*)BlogPosts)... it's a module to add podcasting support for Orchard 1.6. So far my Add/Edit admin pages work fine for the top level container. I'm trying to now implement the Item page (for instance, this page for blogs: /Admin/Blogs/73).

My action is being hit in the admin controller & I can see it is rendering the view. However when I try to create the dynamic object, I get an "oops" error page about an unhandled exception. Within the logs I see it is dying on a lambda expression, but i can't find where it is dying. The line that is causing it is:
dynamic podcast = Services.ContentManager.BuildDisplay(podcastPart, "DetailAdmin");

What is needed for that to work? I've tried passing in just my part, but I always get an error. Obviously I'm missing something, but can't figure out what it is. The blog module is a close mirror to what I want but been staring it for a 1/2 day and can't figure out what I'm missing. Ideas?

Having trouble getting VS to hit any breakpoints on Orchard and thus can't pick through it... didn't find any help on how to get around this... frustrating... as I'm sure it could then see what root error was. :(
Jul 12, 2013 at 8:07 PM
If you go to Debug -> Exceptions and tick the checkboxes in the "Thrown" column for "Common Language Runtime Exceptions", then launch the debugger and reproduce the exception, the debugger will break right where the exception is thrown.
Jul 12, 2013 at 8:08 PM
Edited Jul 12, 2013 at 8:08 PM
If your breakpoints look disabled and they're not being hit, do a rebuild and recycle your app pool. Warmup the site first, then attach the debugger.
Jul 12, 2013 at 8:28 PM
So sorry for the bother... somehow VS's config changed to not load any symbols (Tools > Options > Debugging > Symbols)... got it sorted. Thanks. Back to Orchard dev...
Jul 12, 2013 at 8:56 PM
No worries, glad you resolved it. Happy coding!