Vulnerability in EPiServer.Forms
I'm trying to use standard EPiServer functionality available in edit mode which is copy and paste page. But sometimes it seems to be not working and exception which I'm getting looks like this:
[EPiServerException: Can't copy page, because: Value cannot be null.Parameter name: key]EPiServer.LocalPageStore.Copy(PageReference pageLink, PageReference destinationLink, AccessLevel requiredSourceAccess, AccessLevel requiredDestinationAccess, Boolean publishOnDestination, Boolean allowThreading) +654EPiServer.DataFactory.Copy(PageReference pageLink, PageReference destinationLink, AccessLevel requiredSourceAccess, AccessLevel requiredDestinationAccess, Boolean publishOnDestination, Boolean allowThreading) +265EPiServer.DataFactory.Copy(PageReference pageLink, PageReference destinationLink, Boolean allowThreading) +108EPiServer.UI.Edit.CommandActions.PasteCommandTool_Click(Object sender, EventArgs e) +804EPiServer.UI.WebControls.ToolButton.OnClick(EventArgs e) +108EPiServer.UI.WebControls.ToolButton.RaisePostBackEvent(String eventArgument) +155System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +177System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1746
Any ideas what is the problem?
To add one thing, from code, following line throws the same exception:
EPiServer support, I have exactly the same problem and it also appears when trying to export data through the admin functionality - is this a bug?
This error happens on both 5.1.422.122 and 5.1.422.256.
Can you please help?
I can't find any bugs for the issue nor any support cases.
Could you please enable debug logging and try to reproduce the error?
I had the same problem when trying to export files, it had something to do with using VirtualPathNativeProvider instead of VirtualPathVersioningProvider.
When using VirtualPathNativeProvider for "Global files" it is not possible to export files using Export data through the admin mode, you only get the error "Value cannot be null. Parameter name: key"
I have recognized something like a bug that can have this effect. This is on CMS5 R2 SP1.
I have deleted the customFileSummary attribute in web.config to just show default file metadata. When done this files wont export or mirror. Probably is the same methods used when copying a page.
I have a support case running on this but have not got any answer yet.
"What has been done? Well one of the things the customer was unpleased about was the English text in the file upload dialog. After some research I found that they originated from the customFileSummary in web.config . OK, So I deleted that attribute and got the default texts in Swedish and the customer is now happy.
<virtualPath> <!-- customFileSummary="~/FileSummary.config"-->
The problem is that without the customFIleSummary attribute files being uploaded will not export. They generate a exception!!!
How to repeat:
Test first in a "out of the box" site with the default customfilesummary attribute in place to insert a file in a page. Now go to admin and make a test export of the newly created page. The test will return OK. (as supposed)
Step two: Now delete the customFileSummary attribute and repeat the upload and insert of a file. When you now do an export in admin mode you will get an exception!!! (important that you make a new upload and don't reuse the first uploaded file)
Further tests: If you take the previous uploaded file and attach it to a new page it will work! If you put the customfile attribute back. New (and the first) file will export but the file uploaded while the custom file summary attribute was deleted will never be able to be exported."
I had a similar problem when exporting pages using EPiServer 5.2.375.133.
The problem was that the pages i tryed to export contained a property that pointed to path handled by a VirtualPathNativeProvider.
To solve this i temporarly removed the VirtualPathNativeProvider.
Hope this helps.