Try our conversational search powered by Generative AI!

Export/Import does not handle resources in "For this Site" correctly

Found in

EPiServer.CMS.Core 11.1.0

Fixed in

EPiServer.CMS.Core 11.12.0

(Or a related package)

Created

Apr 25, 2019

Updated

May 06, 2019

Area

CMS Core

State

Closed, Fixed and tested


Description

If content is using resources in "For this site" structure, an export/import from one site to another might fail with a message like:

Exception: Content type "SysContentFolder" is not allowed to be created under parent of content type "APageType"

If folders are allowed to be created under the destination page type, it will not fail with above message but instead the imported resource from 'For this site' will be imported instead under the selected destination.

Steps to reproduce:

  1. Create two different sites (should be different databases).
  2. Go into "Manage web sites" in admin mode and make sure the sites does not have a wildcard host ''. Also, make sure the *Use site-specific assets box is selected.
  3. Go to edit mode on one site (the export side) and create a Images folder in the For this Site root. Upload an image to the Images folder.
  4. Create a page that references the image (e.g., in MainBody). Publish the page.
  5. Go to admin mode and export the newly created page.
  6. Go to admin mode on other site (import side) and import the package.

Expected:
The page is imported without errors and a folder 'Images' is create in 'For this site' root with the image.

Actual:
Either
1) Exception: Content type "SysContentFolder" is not allowed to be created under parent of content type "APageType"
2) No error on import but when going to admin mode > Manage content, you see that the folder 'Image' was created under selected destination instead of in the For this site folder.