SI Search Exception Related to URL

Description

This error message causes search to not function correctly when searching from a module or using the site search:

AssemblyVersion: 7.1.1
PortalID: 0
PortalName: Devsd
UserID: 1
UserName: host
ActiveTabID: 63
ActiveTabName: Discussions
RawURL: /DesktopModules/DNNCorp/Discussions/API/Social/ContentSearch?keywords=concrete&contentTypeId=15&max=5
AbsoluteURL: /DesktopModules/DNNCorp/Discussions/API/Social/ContentSearch
AbsoluteURLReferrer: http://schooldude.dnndev.me/Community/Engage/Discussions.aspx
UserAgent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.95 Safari/537.36
DefaultDataProvider: DotNetNuke.Data.SqlDataProvider, DotNetNuke
ExceptionGUID: 0cb1572a-8730-45a8-83cf-6ed3f4479211
InnerException: Object reference not set to an instance of an object.
FileName:
FileLineNumber: 0
FileColumnNumber: 0
Method: DotNetNuke.Entities.Urls.BasicFriendlyUrlProvider.FriendlyUrl
StackTrace:
Message: System.NullReferenceException: Object reference not set to an instance of an object. at DotNetNuke.Entities.Urls.BasicFriendlyUrlProvider.FriendlyUrl(TabInfo tab, String path, String pageName, PortalSettings settings) at DotNetNuke.Services.Url.FriendlyUrl.DNNFriendlyUrlProvider.FriendlyUrl(TabInfo tab, String path, String pageName, PortalSettings settings) at DotNetNuke.Common.Globals.NavigateURL(Int32 tabID, Boolean isSuperTab, PortalSettings settings, String controlKey, String language, String pageName, String[] additionalParameters) at DotNetNuke.Common.Globals.NavigateURL(Int32 tabID, Boolean isSuperTab, PortalSettings settings, String controlKey, String language, String[] additionalParameters) at DotNetNuke.Common.Globals.NavigateURL(Int32 tabID, Boolean isSuperTab, PortalSettings settings, String controlKey, String[] additionalParameters) at DotNetNuke.Common.Globals.NavigateURL(Int32 tabID, PortalSettings settings, String controlKey, String[] additionalParameters) at DotNetNuke.Services.Search.Controllers.ModuleResultController.GetDocUrl(SearchResult searchResult) at DotNetNuke.Services.Search.Controllers.SearchControllerImpl.GetSecurityTrimmedResults(SearchQuery searchQuery, LuceneQuery luceneQuery) at DotNetNuke.Services.Search.Controllers.SearchControllerImpl.GetResults(SearchQuery searchQuery) at DotNetNuke.Services.Search.Controllers.SearchControllerImpl.ModuleSearch(SearchQuery searchQuery) at DotNetNuke.SocialLibrary.Components.Controllers.ContentIndexController.Search(ModuleInfo moduleInfo, String text, Int32 limit) at DotNetNuke.SocialLibrary.Services.ControllerBase.ContentSearch(String keywords, Int32 contentTypeId, Int32 max)

QA Test Plan

None

Activity

Show:
Alexey Tregub
December 13, 2013, 10:02 PM

Closed on the base of code review

Charles Nurse
December 13, 2013, 9:07 PM

This has been regressed by code review - the try/catch block has been added.

Alexey - it can be closed.

Ben Zhong
October 31, 2013, 5:56 AM

Fix bug DNN-3466: add the try-catch to handle exception when generate url.

Ash Prasad
September 10, 2013, 6:47 PM

We still need to add a try catch exception per my initial comment as (per Ben) couple of more customers have somehow landed in this situation. In any case, Search should not blow up.

Eleonora Ikponmwosa
August 28, 2013, 6:49 PM

This error occurs because there is no primary alias defined.
Portalsetting (PortalAlias) in ModuleResultsController-> in GetDocUrl(SearchResult searchResult) is null.
This was causing null reference exception in FriendlyUrlInternal(TabInfo tab, string path, string pageName, string portalAlias, PortalSettings portalSettings):
if (String.IsNullOrEmpty(portalAlias) && portalSettings != null)
{
portalAlias = portalSettings.PortalAlias.HTTPAlias;
}

To resolve this on deployed copy set alias as Primary.
On customer site it shouldn't happen as they should have primary alias.

Complete
Your pinned fields
Click on the next to a field label to start pinning.

Assignee

Unassigned

Reporter

Ben Nelson

Triage

Triaged

Fixed in Build

Includes Code Fix

No

Documentation Required

No