Glass.Mapper icon indicating copy to clipboard operation
Glass.Mapper copied to clipboard

GetRenderingParamers() fails to assign values to model

Open richardhauer opened this issue 8 years ago • 1 comments

The overload public T GetRenderingParameters<T>(NameValueCollection parameters, ID renderParametersTemplateId) where T : class calls into Utilities.CreateFakeItem() which does not correctly initialise the returned item's Fields list. This results in the "set" process being skipped altogether, and the final returned Glass-mapped object having just the default values.

Ideally, the Utilities.CreateFakeItem() function should correctly "load" the item from its Template definition before returning the item to GetRenderingParameters()

richardhauer avatar Oct 16 '17 08:10 richardhauer

Hi Richard

Were you able to see if this was a FakeDb issue?

mikeedwards83 avatar Oct 26 '17 17:10 mikeedwards83