Fixing Error with ?base in Link 

It was brought to my attention this morning by a reader of this site that in DotNetNuke 4.5.2 and later that the querystring ?base is added after the URL in the link from a sites logo.  I am not sure of the reasoning behind this however I do know that some individuals are seting event log errors due to this added parameter.  Luckly the fix is VERY simple.

To fix this isuse you will need to modify the /Admin/Skins/Logo.ascx.vb file on your DotNetNuke Installation, you simply have to remove a few charasters from the line that sets the navigate URL.  Below is the before and after.

Change This:

hypLogo.NavigateUrl GetPortalDomainName(PortalSettings.PortalAlias.HTTPAlias, Request) & "/" & glbDefaultPage & "?base"

To This:

hypLogo.NavigateUrl GetPortalDomainName(PortalSettings.PortalAlias.HTTPAlias, Request) & "/" & glbDefaultPage 

Once you save that file you should then notice the appropriate link in your logo. I am not sure WHY this is the way it is, but there doesn't appear to be any issue with this modification as it is simply taking you to the root.

Posted by Mitchel on Friday, August 03, 2007
 

Comments

I've noticed this myself. No "official" explanation from the core team yet?

By Tom Kraak on Friday, August 03, 2007 at 9:50 PM

GREAT solution Mitchel, thanks a lot. As usual, you have a reaction time very short, and a perfect solution.

DV FX

By Déclic Vidéo FX on Saturday, August 04, 2007 at 2:27 AM

Tom - Nothing at all from the core team yet at least nothing that I know about....

By mitchel.sellers@gmail.com on Saturday, August 04, 2007 at 2:53 AM

The reason was apparently to fix an error they were having with making the logo show when the app was installed in Visual Studio using Casini.
http://www.dotnetnuke.com/Community/Forums/tabid/795/forumid/108/threadid/158084/scope/posts/Default.aspx

By John Mitchell on Monday, August 13, 2007 at 10:42 PM

Thanks; worked like a champ. Now fix yours! :)

By Terp on Tuesday, August 14, 2007 at 10:51 PM

John pointed out that we can also remove the default.aspx reference, too; I just backed that out and it does, in fact, redirect to the pure domain alias...just wanted to let you know.


hypLogo.NavigateUrl = GetPortalDomainName(PortalSettings.PortalAlias.HTTPAlias, Request)

By Terp on Saturday, August 18, 2007 at 10:21 PM

Terp,

Very good point!

By mitchel.sellers@gmail.com on Saturday, August 18, 2007 at 10:40 PM

Terp, I am not sure that I have understood what you mean.
Do you mean removing:
& "/" & glbDefaultPage
Correct ??? I have done this, but I would like to be sure that it will not harm another functionnality...

DV FX

By Déclic Vidéo FX on Tuesday, August 21, 2007 at 7:52 AM

DV FX,

Yes, that is exactly what he is talking about, but you can actually leave the "/" portion there if you want.

By mitchel.sellers@gmail.com on Tuesday, August 21, 2007 at 9:43 AM

Just for information for those like me who was wondering... This problem is solved on DNN 4.8.2

DV FX

By Déclic Vidéo FX on Sunday, May 11, 2008 at 1:53 PM

Name (required)

Email (required)

Website

CAPTCHA image
Enter the code shown above:

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.

Friend of RedGate

www.datasprings.com - DotNetNuke ModulesICG

Click here for advertising information.

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.