Link Collection relative url with query string Prob

Vote:
 

Hi

when adding new link " with relative to the epi with query string

something like /en/test/test?vmod=redu

i can save and i see the link but when i try to edit i recive this  error message


'/en/test/test?vmod=redu' is not a valid virtual path

HttpException (0x80004005): '/en/test/test?vmod=redu' is not a valid virtual path.] System.Web.VirtualPath.Create(String virtualPath, VirtualPathOptions options) +8861003 System.Web.VirtualPathUtility.ToAbsolute(String virtualPath, String applicationPath) +22 EPiServer.Web.Hosting.VirtualPathMappedProvider.GetFile(String virtualPath) +145 EPiServer.UI.Editor.Tools.Dialogs.HyperlinkProperties.OnLoad(EventArgs e) +1186 System.Web.UI.Control.LoadRecursive() +50 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627

 

how can add relative links to epi pages with query string ?

 

#40945
Jun 23, 2010 23:18
Vote:
 

This doesn't solve your problem, but I was able to completely replicate what you're seeing.

I tried to get cute and create that URL as a new page, with a shortcut of "External" and your URL, and then link to that EPiServer page, instead of directly to the URL.  However I got the same error when I went to edit the link because, behind the scenes, EPiServer uses the external URL in the LinkCollection, not the EPiServer page.

I think the problem you have is that EPiServer thinks your link is to a document over in File Management.  Since it starts with a "/" but doesn't resolve to an internal page, EPiServer is convinced it's a document, and is trying to resolve a path to it (which it can't, because of the querystring).

Based on what I'm seeing, the solution is to either delete and recreate the link each time, or just use the absolute path, domain name and all.  I hope I'm wrong.  Sorry I couldn't give you a solution.

#40954
Jun 24, 2010 8:54
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.