Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsStoreStoreBest Way to Contribute?Best Way to Contribute?
Previous
 
Next
New Post
4/28/2008 6:49 PM
 

 

The following patch fixes a problem with the Provider controller when it searches through the folders looking for providers.  If it finds a folder that doesn't contain a provider, rather than just ignoring the folder it throws an exception.  This is especially evident when you use SVN.  The folder name for SVN could be ".svn" or "_svn".  This code ignores any folders that don't contain a provider regardless of the name.

 

Index: ProviderController.cs
===================================================================
--- ProviderController.cs    (revision 53)
+++ ProviderController.cs    (working copy)
@@ -66,11 +66,15 @@
                 virtualPath += getTrailingFolder(folder);
 
                 ProviderInfo providerInfo = getProviderInfo(folder);
-                providerInfo.Path = folder;
-                providerInfo.VirtualPath = virtualPath;
-                providerInfo.Type = providerType;
+        //Only add this folder as a provider if a provider is found in this folder.
+        if (providerInfo != null)
+        {
+          providerInfo.Path = folder;
+          providerInfo.VirtualPath = virtualPath;
+          providerInfo.Type = providerType;
 
-                providerList.Add(providerInfo);
+          providerList.Add(providerInfo);
+        }
             }
         }
         #endregion
@@ -133,7 +137,9 @@
                 }
                 else
                 {
-                    throw new FileNotFoundException("No ProviderInfo.xml file was found in '" + providerPath + "'.");
+          //No ProviderInfo.xml file was found in this folder.  Not sure that deserves an exception??
+          return null;
+                    //throw new FileNotFoundException("No ProviderInfo.xml file was found in '" + providerPath + "'.");
                 }
             }
             else

 
New Post
6/12/2008 1:55 PM
 

Stuart,

Thanks for the code, this is great.

While doing some testing on one of our sites that have more than one child category (Category-->Category-->Category) relationship I recieved an Out of Memory Exception. After some investigation i noticed a small issue with the code. Here is the changes I made.

CategoryInfo ParentCategory = category;
while (ParentCategory.ParentCategoryID > 0)
{
         ParentCategory = categoryController.GetCategory(category.ParentCategoryID);


the reference to the category is never changed for category.ParentCategoryID. I changed to the following and fixed my issue.

CategoryInfo ParentCategory = category;
while (ParentCategory.ParentCategoryID > 0)
{
         ParentCategory = categoryController.GetCategory(ParentCategory.ParentCategoryID);

Thanks again,

 

 

 


Henry Kenuam
Engage Software
St. Louis, MO
314.966.4000



The leading provider of DotNetNuke support, training and custom module development
 
New Post
6/14/2008 11:08 PM
 

 

Thanks Henry.

I don't think my categories were nested heavily enough for this to show up.  But I have absorbed your fix into my code.  Thanks.

Since posting those first few mods I have also developed a PayPal Credit card payment provider and a replacement AddressProvider and TaxProvider.  I have also fixed the Provider Model for Tax and Address Providers so that I could develop my providers without destroying the Default providers that come with the Store.

If Gilles reads this and is interested in getting those providers working in the main project (if he hasn't already done it of course) I would be happy to prepare the patch.

The ShippingProvider is next on my list!

Stuart

 
New Post
6/15/2008 3:22 AM
 

Stuart,

I expect that Gilles will contact you, he has been offline the past weeks but AFAIK he will be back soon.


Cheers from Germany,
Sebastian Leupold

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
New Post
6/30/2008 7:24 AM
 

Thanks!  it works a treat!

 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsStoreStoreBest Way to Contribute?Best Way to Contribute?


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out