john-wakefly
-
1/29/2010 2:17:31 PM
RE:Media Library items are missing "www" in the url of the image
I was able to fix this with a code change to one of the core Kentico controls.
On line 2162 of the \CMSModules\MediaLibrary\Controls\MediaLibrary\FileList\FileList.ascx.cs code, I changed this:
fileUrl = UrlHelper.GetApplicationUrl(si.DomainName) + fileUrl.TrimStart('~');
to this:
fileUrl = UrlHelper.GetApplicationUrl() + fileUrl.TrimStart('~');
The original code uses the site domain name stored in the system, which has no "www" (and it can't be added). The new code uses the HttpContext (within the Helper method) to get the domain, and any subdomain.
|