You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Issue by alanta Sunday May 24, 2020 at 20:05 GMT Originally opened as Wyamio/Wyam#12
Setting a custom model for a Razor view while also using a layout and viewstart file causes an error similar to this:
Exception while processing document /ViewStartAndLayout/Test.cshtml in module unknown: The model item passed into the ViewDataDictionary is of type 'System.Int32[]', but this ViewDataDictionary instance requires a model item of type 'Wyam.Common.Documents.IDocument'.
There are two new tests in this PR. There was no test yet for setting the view model from a delegate and the second test covers the error.
The fix I did doesn't seem to break any tests which seems, which makes me wonder why that line was there in the first place.
A bit of background: I'm working on a Wyam module that pulls in content from Kontent headless CMS. The client for that CMS supports strong typed content models which is something I'm also hoping to support with this module for Wyam.
Issue by alanta
Sunday May 24, 2020 at 20:05 GMT
Originally opened as Wyamio/Wyam#12
Setting a custom model for a Razor view while also using a layout and viewstart file causes an error similar to this:
There are two new tests in this PR. There was no test yet for setting the view model from a delegate and the second test covers the error.
The fix I did doesn't seem to break any tests which seems, which makes me wonder why that line was there in the first place.
A bit of background: I'm working on a Wyam module that pulls in content from Kontent headless CMS. The client for that CMS supports strong typed content models which is something I'm also hoping to support with this module for Wyam.
alanta included the following code: https://github.com/Wyamio/Wyam/pull/12/commits
The text was updated successfully, but these errors were encountered: