1

Resolved

Edit Page: 'Save as New' error

description

When editing a page, and saving the current page settings "Save as New" the page posts-back to edit_page.aspx?p=[a]?p=[b], where [a] is the old page id, and [b] is the new page id. In such cases, all details are correctly saved as a new page (as intended) but the page presented is not loaded with the correct details and is therefore unusable.
 
For example: http://localhost/Morphfolia.Web/morphfolia/_publishing/edit_page.aspx?p=7?p=12
 
This has been fixed and will be released in the next version: v2.4.2.0.
 
To fix in older versions (specifically v2.4.1.0) remove this line of code (line 652, in the EditPage.cs file):
 
CurrentContext.Response.Redirect(string.Format("{0}?{1}={2}", CurrentContext.Request.Url.AbsoluteUri, PageIdQueryStringArgumentKey, _PageID));
 
And replace it with these three lines:
 
string destinationUrl = CurrentContext.Request.Url.AbsoluteUri;
destinationUrl = destinationUrl.Remove(destinationUrl.IndexOf("?"));
CurrentContext.Response.Redirect(string.Format("{0}?{1}={2}", destinationUrl, PageIdQueryStringArgumentKey, _PageID));

comments