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

HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsProvidersProvidersCustom Sitemap provider does not fireCustom Sitemap provider does not fire
Previous
 
Next
New Post
6/2/2012 2:14 AM
 

My NewsDesk application is being live beta-tested since almost one year. It had to be used before it was finished, and I am still finishing off stuff. Priority on my list was a sitemap provider. I've been working on it most of the week, and like usual, most of my time has been spent at finetuning the manifest file. Setting up the modified dataprovider was easy. A few glitches pointed themselves out and were quickly corrected. Writing the code was a matter of one day. Making it all work together is where the problem lies.

Based on Chris Patera's blog, it seemed quite simple: create a class that inherrits from DotNetNuke.Services.Sitemap.SitemapProvider:Namespace KhmerSupport.Providers.NewsDesk
    Public Class Sitemap
        Inherits SitemapProvider

The rest of the application is still in vb.net, so I've hept this one in vb.net as well. I do not think this has to do with the issue. I then override the GetUrls function from the SitemapProvider class:
Public Overrides Function GetUrls(portalId As Integer, ps As DotNetNuke.Entities.Portals.PortalSettings, version As String) _
                        As List(Of SitemapUrl)

This function then has to build a list of SitemapUrl and return this list to the caller. Couldn't be simpler.

After I setup the new database structures, I created a rules editor that could calculate priority and changefrequency based on Sections and categories and the age of the article (when priority and changefrequency are not overridden by the article). This Rules Editor is a module on its own, a separate package in the manifest. This part, I got figured out.

Then I wrote the provider. On paper, all should work fine. I modified web.config to add the new sitemap provider:
<add name="KhmerSupportNewsDeskSiteMapProvider" type="KhmerSupport.Providers.NewsDesk.Sitemap, KhmerSupport.NewsDesk"
providerPath="~\DesktopModules\KhmerSupport.NewsDesk\Providers\SitemapProvider\KhmerSupport.NewsDesk.SitemapProvider\" />

The NewsDesk sitemap provider now shows up on the Admin>Search Engine Sitemap page and is enabled. That should do to make the sitemap provider work, isn't it? Sitemap cleared and clicked on the sitemap.aspx link: only the static pages show up. A breakpoint in the GetUrls function is not honored. No errors show up in the event viewer.

Chris' blog had a comment from Lance Long with a similar issue. It is however not clear if this got solved and how.

There is one point over which I have my doubts: the providerPath attribute that I am providing to the system. This is the path to the provider's project files and the vb source file. But on the production computer there is no such path. All code goes into KhmerSupport.NewsDesk.SitemapProvider.dll. The sitemap.xml file will not go to that folder, it must go to ~/Portals/[PortalId]/Sitemap/

I'd like to get this thing to work, so suggestions are more than welcome. I am currently in the 'hopeless' stage of the development cycle. :-(


____________________________________
The one-eyed in the land of the blind.
 
New Post
8/26/2012 5:42 AM
 

This one got solved as well, a bit late because other duties at the university required too much of my time.

The fact is, the code did run, but there was a bug in my code. I was testing on a one-language web portal (km-KH only) and for some reason I still have to find out, Globalization.CultureInfo.CurrentCulture.ToString returns 'en-US', though this culture is not even enabled for this portal. I have to re-think that part anyway, because the searchengine sitemap should list the articles for all languages.

My code seemed not fire because there appears to be a bug in VS 2010: when I let VS automatically detect the type of code to debug, it decides on Managed (v2.0 v1.1 v1.0) instead of Managed (v4.0 ) code. By indicating explicitely the type of code to debug, VS could load the symbols table correctly and I could trap code execution and find where my code went wrong.

 
Previous
 
Next
HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsProvidersProvidersCustom Sitemap provider does not fireCustom Sitemap provider does not fire


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