When copying a SharePoint aligned aspx webpart page from one location to another, the webpart(s) are removed completely from their zones in the copied (destination) page.
For example:
- /FolderA/aPage.aspx contains a webpart
- copy from FolderA to FolderB
- /FolderB/aPage.aspx does not contain webpart, although webpart zone remains
Environmental/Situational details:
- the webpart page I am having issues with has been manually modified from a SharePoint generated webpart page
- If I open the page in SharePoint Designer and "save as", it appears to mitigate the removal of the webpart(s)
- SharePoint 2010 / SPD 2010
Has anyone experienced this or something similar?
[Update 2]
I have noticed then when exporting a list/library view (aspx for example) from SharePoint, it will save the aspx containing post processing data. To elaborate: it contains all the data in the list, after it has been processed by the xslt. It does not export the file structured as it would be should you open the file in SPD.
Another item I have noticed is that when commenting out an item with it will occasionally HTML decode the 'stuff here' content until it is unusable. My solution is to save the file, then edit out the cruft I don't need until I have a clean block. Usually its some xsl or parameters etc.
[End Update 2]
[Update 1]
Test 1
- Opened /Live/ManagerView.aspx in SharePoint Designer 2010 then verified page was working as expected in browser
- Made duplicate copy in current location, verified page works as expected
Saved page as /Dev/ManagerView.aspx, during verification noticed
- All webparts rendered (during a "manual" copy and paste in file structure all webparts are gone) except for one
- The webpart that failed to render correctly displayed a webpart error message.
- I have noticed that the
<XslLink>
tag will shift down a line when saving in SPD. This will "break" the webpart rendering via XSL. Moving it back up a line will fix the issue, usually. This happens very frequently using XSL links
Path shifts down a line, breaks webpart rendering
Shifted back up, fixes webpart rendering
Essentially, in my environment, SharePoint designer seems to be the only way to copy an ASPX page with WebParts in it without removing the WebParts. Even so, SharePoint designer modifies code and must be reviewed and fixed.
[End Update 1]
Conclusion
Copying & Pasting an ASPX file in a file system directory will yield a blank page with all WebParts removed. This appears to be only for my personal environment, although I am trying to verify further.
Copying and Saving an ASPX page in SharePoint Designer will keep the WebParts, but may modify tags (especially
<XskLink>
) formatting. Code should be reviewed post save. Trying to verify if this issue arises for others.
Thanks