September 07, 2011

Canonical Portal Alias Woes DNN 5.6.2

One of the additions to DotNetNuke 5.x (not sure when/where) was the ability for DotNetNuke to provide a Canonical URL in the meta information for your page.  When this all works well, things are going perfectly.  You can configure the site to use the Canonical URL via the "Admin Settings" page and normally all works well, but I had a very "interesting" issue with a site recently and I thought I'd share in case anyone else had a similar issue.

The Back Story

To be sure that everyone knows just how this problem came about I'll give you a little history on the site.  It was one that I built in the same manner that I do for most of my sites when I'm replacing an existing site.  A temporary domain name was used lets call it, all content was then added here and the site was eventually switched over to and went live.

When I did the switch over I did all of the things that you normally do, I deleted the portal alias that was reflecting the domain and everything looked perfect!

The Issue

Now fast forward about one month, when this issue was actually identified.  We had pages where Facebook "Like" buttons were added.  For some reason these buttons were not working they would throw an error, similar to "site responded with a 404".  Now, how the heck did it have this?  I deleted the portal alias, I had the proper alias set as the "default" for the portal and everything.  There was nothing visibly wrong with the portal.  Looking at the source of the page, you could spot the Canonical tag noting the domain?  How was it getting this value?

The Fix

I'll admit, I didn't dig into the core code of DNN, but I found a "fix" for the issue.  Go to "Admin Settings" and simply click "Update".  The second I did this the site updated, all Canonical Url's updated and all of my Facebook "Like" buttons started working.  Now, I'm working now to see if I can re-create this issue and if I can I'm going to log it as a bug in the core, but if you see something funny with your site, you might just try clicking that "update" button!  It can do some good!

Hope this helped!

tags: DNN, DNN Administration
comments powered by Disqus

Content provided in this blog is provided "AS-IS" and the information should be used at your own discretion.  The thoughts and opinions expressed are the personal thoughts of Mitchel Sellers and do not reflect the opinions of his employer.

Content Copyright

Content in this blog is copyright protected.  Re-publishing on other websites is allowed as long as proper credit and backlink to the article is provided.  Any other re-publishing or distribution of this content is prohibited without written permission from Mitchel Sellers.