robingram wrote
I have a DNN installation under CVS source control and I get an error when I try to add a Store Admin module to a page. The error is:
A critical error has occurred.
No ProviderInfo.xml file was found in '\DesktopModules\Store\Providers\TaxProviders\CVS\'.
Can anyone suggest a way of getting around this apart from taking the store module out of source control?
Thanks,
Rob.
Yes thats a bug in ProviderController.cs, it can be fixed by adding two code changes ...
When checking for .xml files in the directory, return null if none are found (instead of throwing an exception), and secondly, when adding providers to the collection, dont add it if getProvider returns null...
ProviderInfo getProviderInfo(string providerPath)
{
// ... etc
else
{
// bugfix: return null if no providerinfo.xml was found, dont throw an exception - thats too harsh!
return null;
//throw new FileNotFoundException("No ProviderInfo.xml file was found in '" + providerPath + "'.");
}
// .... etc
}
AND
public ProviderController(StoreProviderType providerType, string modulePath)
{
// ...etc
foreach(string folder in folderList)
{
virtualPath = providerPaths[(int)providerType].Replace("\\", "/");
virtualPath += getTrailingFolder(folder);
ProviderInfo providerInfo = getProviderInfo(folder);
// bugfix: only add provider info if not null
if (providerInfo != null)
{
providerInfo.Path = folder;
providerInfo.VirtualPath = virtualPath;
providerInfo.Type = providerType;
providerList.Add(providerInfo);
}
}
// ... etc
}
Hopefully this fix will be in the next release :)
JK