Quantcast
Channel: Developer to developer
Viewing all articles
Browse latest Browse all 9076

Custm ContentProvider throwing widget.js error after upgrade to episerver 11

$
0
0

Hi.

After upgrading to episerver 11 we are experiencing that one of our contentProviders are getting an error in the widget.js script. The error is this one:
TypeError: this.noDataMessages is null; can't access its "single" property[Learn More]widgets.js:2:558865

The error occures when i try to click on the root folder for the contentprovider, and no data is returned.
I have debugged through the contentprovider LoadChildrenReferencesAndTypes and LoadContent methods, and both are returning what is expected, but still no data in the cms. the initialization class is as follows:

[InitializableModule]
[ModuleDependency(typeof(InitializationModule))]
public class EmployeeDataProviderInitialize : IInitializableModule
{
public void Initialize(InitializationEngine context)
{
var contentRepository = context.Locate.ContentRepository();
var providerManager = context.Locate.Advanced.GetInstance<IContentProviderManager>();

var entryPoint = contentRepository.GetChildren<EmployeeRootFolder>(ContentReference.RootPage).FirstOrDefault();

if (entryPoint == null)
{
entryPoint = contentRepository.GetDefault<EmployeeRootFolder>(ContentReference.RootPage);
entryPoint.Name = EmployeeDataProviderSettings.ProviderDisplayName;
contentRepository.Save(entryPoint, SaveAction.Publish, AccessLevel.NoAccess);
}

var providerValues = new NameValueCollection
{
{ContentProviderElement.EntryPointString, entryPoint.ContentLink.ID.ToString()},
{ContentProviderElement.CapabilitiesString, ContentProviderElement.FullSupportString}
};

var employeeDataProvider = new EmployeeDataProvider();
employeeDataProvider.Initialize(EmployeeDataProviderSettings.Key, providerValues);
providerManager.ProviderMap.AddProvider(employeeDataProvider);

}

}

Has anyone else experienced this after upgrading? it was running on episerver 10.10.1, and are now running episever 11.10.1


In advance thanks for your help.
Best Regards
Pål


Viewing all articles
Browse latest Browse all 9076

Trending Articles