I've set the "enabledPreview" to true within the grid config , but I'm having issue displaying a view with a custom controller within the grid. It shows the below error
The model item passed into the dictionary is of type 'TestApplication.ViewModels.QuoteViewModel', but this dictionary requires a model item of type 'Umbraco.Core.Models.IPublishedContent'.
Tried that, i'm calling a different view when there's a preview but another error appear showing the below
"Insufficient stack to continue executing the program safely. This can happen from having too many functions on the call stack or function on the stack using too much stack space."
If you are passing down a strongly typed view model, you need to update your view to let it know what model to expect. By default it'll expect IPublishedContent, but if you change that, you need to let it know.
EnablePreview set to true with CustomController
I've set the "enabledPreview" to true within the grid config , but I'm having issue displaying a view with a custom controller within the grid. It shows the below error
Any way to go around this?
Thanks
Hi Jeric,
I fixed this by returning the view without the model in the custom controller.
Wesley
Hi Wesley,
At the top of your view, do you still use any @model?
Can you share how your view and controller looks like (a sample will be great).
Thanks
Tried that, i'm calling a different view when there's a preview but another error appear showing the below
"Insufficient stack to continue executing the program safely. This can happen from having too many functions on the call stack or function on the stack using too much stack space."
Jeric,
I take it you are trying to pass down a custom, strongly typed model? If so, did you update your view to the following?
If you are passing down a strongly typed view model, you need to update your view to let it know what model to expect. By default it'll expect IPublishedContent, but if you change that, you need to let it know.
Matt
Thanks Matt, let me try that out
is working on a reply...