getSiteVisit is generating invalid alias requests to /alias/null

Description

This code introduced a bug where alias service is asked for an alias which is invalid and will never exist (/alias/null) and ends up calling this method:
String getTarget(String alias)

The bad line is
portal.getSiteNeighbourhoodService().parseSiteAlias(siteId)

added in SAK-13087

public Site getSiteVisit(String siteId) throws PermissionException, IdUnusedException
{
...
else
{
String reference = portal.getSiteNeighbourhoodService().parseSiteAlias(siteId);
Reference ref = EntityManager.getInstance().newReference(reference);
try
{
return SiteService.getSiteVisit(ref.getId());
}
catch (IdUnusedException iue)
{
}
}

Activity

Show:

Hudson CI Server May 12, 2014 at 1:34 PM

Integrated in sakai-10-java-1.7 #62 (See http://builds.sakaiproject.org:8080/job/sakai-10-java-1.7/62/)

Result = UNSTABLE

Aaron Zeckoski May 7, 2014 at 11:22 AM

The bug was introduced in but that ticket is still open because I think there is more work happening on that one. It should be merged even without that being resolved.

Earle Nietzel May 7, 2014 at 10:56 AM

This is marked as a merge for 10.x but there is a dependency on which is not resolved yet.

Does this issue need or can it be merged without it?

Aaron Zeckoski April 23, 2014 at 11:55 AM

I don't see the calls coming through anymore so it looks good to me

Hudson CI Server April 23, 2014 at 8:23 AM

Integrated in sakai-trunk-java-1.7 #206 (See http://builds.sakaiproject.org:8080/job/sakai-trunk-java-1.7/206/)
SiteNeighbourhoodService.parseSiteAlias is documented as returning null

Although we can create a reference and lookup a site with null it's never going to work, so just shortcut out. (Revision 308506)
Don't attempt to lookup aliases for null.

The timeout handler in the portal doesn't have a active site and so asks the portal to render a response with a null site, the portal tries to lookup aliases for null which will never work. The SiteService has a null check shortcut but the alias service doesn't. Adding shortcut to prevent nulls getting to the alias service. (Revision 308505)

Result = UNSTABLE

Fixed

Details

Priority

Affects versions

Fix versions

Components

Assignee

Reporter

Created April 22, 2014 at 2:51 PM
Updated July 1, 2014 at 7:43 AM
Resolved April 23, 2014 at 5:13 AM