Tuesday, December 5, 2017

Sitecore ValueFactory error after upgrade

After upgrading a Sitecore instance from version 8.1 to 8.2 (update 5) the following error appeared on the web site and Sitecore admin area:
ValueFactory attempted to access the Value property of this instance.
Further down the stack trace there was mention of both MongoDB and analytics:
[InvalidOperationException: ValueFactory attempted to access the Value property of this instance.]
System.Lazy`1.CreateValue() +739
System.Lazy`1.LazyInitValue() +428
MongoDB.Bson.Serialization.Serializers.EnumerableInterfaceImplementerSerializer`2.MongoDB.Bson.Serialization.IChildSerializerConfigurable.get_ChildSerializer() +15
Sitecore.Analytics.Data.DataAccess.MongoDb.DictionaryRepresentationConvention.Apply(IBsonSerializer serializer) +109
Sitecore.Analytics.Data.DataAccess.MongoDb.DictionaryRepresentationConvention.Apply(IBsonSerializer serializer) +120
Sitecore.Analytics.Data.DataAccess.MongoDb.DictionaryRepresentationConvention.Apply(BsonMemberMap memberMap) +33
MongoDB.Bson.Serialization.Conventions.ConventionRunner.Apply(BsonClassMap classMap) +358
MongoDB.Bson.Serialization.BsonClassMap.AutoMapClass() +79
MongoDB.Bson.Serialization.BsonClassMap.LookupClassMap(Type classType) +435
MongoDB.Bson.Serialization.BsonClassMapSerializationProvider.GetSerializer(Type type, IBsonSerializerRegistry serializerRegistry) +234
MongoDB.Bson.Serialization.BsonSerializerRegistry.CreateSerializer(Type type) +174
In this instance, both the web forms for marketers and email experience modules were installed. As per the upgrade instructions, these configuration files were disabled. However a couple of the WFFM configuration files were missed. These files are not all listed alphabetically as they have three naming conventions, so it's easy to miss one:
  • Sitecore.Forms.*
  • Sitecore.MvcForms.config
  • Sitecore.WFFM.*
You may also see the following error if you miss the Sitecore.MvcForms.config file:
Could not find configuration node: /sitecore/wffm/data/perRequestStorage

No comments:

Post a Comment