MVC: Model is null in controller when in hybrid mode
I am building my first widget in VS 2010, SF 6.3 (demo). I followed the steps from a Telerik video on YouTube: www.youtube.com/watch
I have two page templates, one that is hybrid, one that is pure MVC. When I step through the code in hybrid mode, it's evident the model is null. In pure MVC mode, the model is received correctly by the controller.
Here is my Controller:
Your code looks all right. I have tried it at my end using the latest version 6.3.5020 and It worked exactly as it is supposed to - consistent in both hybrid and pure modes.
Do you have any exception when using the hybrid mode or you just go to the Success view with no NewsItem created? Also, what input have you used? Anything you can share to make me reproduce it will be much appreciated
I saw that you are observing abnormal high CPU usage when you application restarts. That is due to the Razor views we compile at run-time when the application starts. With the latest build those are pre-compiled and the CPU usage is back to normal.
Perhaps you can upgrade to the latest hot fix and and try the same widget on the latest version, which is the same as mine (link here).
I'm actually having the same issue in version 7. Anyone know if this is a known issue or not? No matter what I try the model is null. I can pull the values out of a FormCollection but I'd rather not.
I have tested the code below on Sitefinity 7 hybrid mode and it returns the model as expected (screenshot).
Could you please provide us with your code in order to inspect and test it?