Open cubeberg opened 7 years ago
FYI - I was using build 4.2.1.188 but updated to 4.2.1.190, no improvement.
I forgot to mention - I am adding the Models dll for auto mapping.
var attributes = new AttributeConfigurationLoader("<projectname>.Models");
return new IConfigurationLoader[] { attributes };
Hi
This is odd because the exception is being raised by the RenderField pipeline in Sitecore.
What makes this very odd is that we get an item from SC earlier in the process and then read the fields off this so to get to the point where you received the error and item must have existed.
Can you detail the steps I need to take to replicate this error?
That's the tough part - it's not consistent unfortunately. I replicate it on my local dev environment, sometimes but not always - even with the exact same steps. I'll keep working to see if I can find any more information.
I compiled a copy of glass.mapper.sc so I could add logging statements - RunPipeline is indeed called with no field name. Adding a check for an empty field name provided a short-term fix at least. I'm going to keep moving up the stack.
I have added more logging to the renderfield call so that we can identify the field and item that threw the error. Maybe this will help. https://github.com/mikeedwards83/Glass.Mapper/commit/a3d8bcfd819cd54ac7469d2736026df75cfbe34b
Sorry for taking so long to check back in - that definitely helped - I don't need my custom version of the library anymore. I am still seeing errors - interestingly enough - it only happens on rich text fields.
This is still happening on RichText fields as parameter templates fields.
I can see the error mgs you are logging.
[MapperException: Failed to render field {xxxxx-D027-434C-BDEC-xxxx} on item {xxxxx-1959-41F1-A3D6-xxxx}]
This seems to work for couple of times after publish and starts to fail again. I tried disabling the cache thinking of an caching issue, still it throws the same error.
Anybody find a solution? I'm running into the same issue
@EstherTM Are you also using Rich Text Fields?
Hi,
I notice that this issue is intermittent to some environments. In my case, this occurs when there is an unused rich text field existing in my shared class in your MVC. When I say unused, there is no rich text field to map in your template.
I have no solid proof telling that this is really caused by rich texts field. But found a similar issue in the Known Issues section of Sitecore Developer Network site that was also caused by Rich Text fields. See Link: https://sdn.sitecore.net/Resources/Tools/V53_to_V6/Release%20Notes/Known%20Issues.aspx
I'm getting an error (not in all cases - depending on the parent item) when an item is added to a page, before a datasource is assigned. I honestly can't figure out what's going on, but I assume it has something to do with mapping the wrong template. Sitecore 8.2 Initial Release
Example controller method: