I am trying to add a custom StandardValues provider to a Sitecore 8.1 site (8.1.0 rev 160519) and I am not having a good time.
To do this I reflected the standard Sitecore.Data.StandardValuesProvider in Sitecore.Kernel, copied all the codez and made the change I want. It compiles, so I assume it'll work :D
btw I am modifying the behaviour of private SafeDictionary<ID, string> GetStandardValues(Item item)
, for reasons
I attempt to wire up the patch thusly: -
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/">
<sitecore>
<standardValues>
<providers>
<add name="sitecore">
<patch:attribute name="type">[REDACTED].Web.Sitecore.Providers.[REDACTED]StandardValuesProvider, [REDACTED].Web</patch:attribute>
</add>
</providers>
</standardValues>
</sitecore>
</configuration>
But although my patch looks like it's worked in /showconfig.aspx, the site itself doesn't load: -
Server Error in '/' Application.
Unexpected provider type:
[REDACTED].Web.Sitecore.Providers.[REDACTED]StandardValuesProvider
Expected: Sitecore.Data.StandardValuesProvider
Kind of like.. it doesn't want to see another kind of provider besides the default one ?
Has anyone tried to do this and succeeded ?
Sitecore.Data.StandardValuesProvider
instead?