Hello,
I'm trying to read my parameters but it seems to be something strange going on here. I use the same code and it works with the EPiServerNullUrlRewriteProvider. My code is as follows:
On one usercontrol:
-------
protected string GetSomePageURL(string val)
{
UrlBuilder url = new UrlBuilder((UriSupport.AddQueryString(CurrentPage.LinkURL, "somepage", val));
EPiServer.Global.UrlRewriteProvider.ConvertToExternal(url, CurrentPage.PageLink, System.Text.UTF8Encoding.UTF8);
return url.ToString();
}
The URLs seems to render correctly with both providers. But with the FriendlyUrl-provider something seems strange with the parameters, it's like something is being cached. My URL is as follows: http://address/some-page/?somepage=overview and I simply output the parameter to a literal on the page and when clicking around on my links in the usercontrol it takes a while before the correct parameter is put through.
Do you havfe any idea what the cause of this could be?
Best Regards
Daniel Öhgren
Saw that I've forgot one ) on the UrlBuilder url = new UrlBuilder((UriSupport.AddQueryString(CurrentPage.LinkURL, "somepage", val)); when I compiled but this was not the problem.
Regards
Daniel
Hi Daniel!
There is a caching bug regarding the friendly url provider in the release that means that the friendly url provider will ignore changes to additional query string parameters. We have fixed the bug and it will be available in the next service drop. Until then it's possible to remove cache for friendly url:s by setting the following web.config value:
I've come up against this bug to. I have a link on pages created by the current user wich allows them to delete the page whitout entering Edit-mode. The link passes the pageID to be deleted using a querystring and if I do multiple deletes the value gets messed up (cached ;) ) resulting in the delete beeing performed on a already deleted page :(
protected string GetSomePageURL(string val) { UrlBuilder url = new UrlBuilder((UriSupport.AddQueryString(CurrentPage.LinkURL, "somepage", val)); EPiServer.Global.UrlRewriteProvider.ConvertToExternal(url, CurrentPage.PageLink, System.Text.UTF8Encoding.UTF8); return url.ToString(); }
The URLs seems to render correctly with both providers. But with the FriendlyUrl-provider something seems strange with the parameters, it's like something is being cached. My URL is as follows: http://address/some-page/?somepage=overview and I simply output the parameter to a literal on the page and when clicking around on my links in the usercontrol it takes a while before the correct parameter is put through. Do you havfe any idea what the cause of this could be? Best Regards Daniel Öhgren