1

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 XslLink formatting before fix

      Shifted back up, fixes webpart rendering enter image description here

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

3
  • Sounds like it has something to do with you Master Page, but definitely don't know for sure. Apr 5, 2014 at 12:28
  • I just tested with a page that didn't link to a master page, same result. Thanks for the input though. I'm assuming that you have not experienced the same problem after having done the same steps - which suggests that this is likely not "as designed". Thanks again Apr 5, 2014 at 13:11
  • I have not experienced this. Was also curious if you are moving the page between sub-sites, or from main site to sub-site. I've seen some weird behavior during these operations. Even though the main and sub are connected, they don't like to share. Another thought, if these are specific web parts which you want specific things to copy over, you can create a template from them and re-paste the template into the new aspx page ... just a thought. Apr 5, 2014 at 15:52

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.