Incorrect image URL when importing data

Fixed in

EPiServer.CMS.Core 11.20.3

Created

Nov 20, 2020

Updated

Jan 15, 2021

Area

CMS Core

State

Closed, Fixed and tested


Description

Steps to reproduce:

  1. On an Alloy sample site, access admin view and enable "English" - "en" and "English (United States)" - "en-US".
  2. Set up multiple sites. The main site (site A) has 'en' master language and the secondary site (site B) has 'en-US' master language. Site B just contains a start page.
  3. Under Manage Websites of admin view, select Use site-specific assets for both sites.
  4. Configure site A with Culture = en, Type = Primary, Scheme = HTTP.
    Configure site B with Culture = en-US, Type = Primary, Scheme = HTTP.
    Remember to remove the wildcard host name.
  5. Go back to edit view and select site A. In the assets pane, select Media and create a folder named image under For This Site.
  6. Upload an image to the image folder.
  7. Select a page that has version in "en" only, for example, Alloy Meet. Add the uploaded image to the Teaser image property of this page. Then publish the page.
  8. Export the Alloy Meet page from site A by going to admin view > Tools and select Export Data. Leave the default options selected and click Export content items to export the page.
  9. Import the Alloy Meet page to site B by going to admin view > Tools and select Import Data. Select the Update existing content items with matching ID check box, and select English (United States) in this step. Upload the export file.
    Please note that the page exported does not have a en-us language version! However, some content has been imported.
  10. Still in site B, check the Media assets pane. The image in the image folder has been imported.
  11. Edit the imported image, move the mouse over the Download this file to get the link of this file, it will be something like: http://testhost:1839/sitesassets/image/darwin.gif
  12. Browse to this URL _http://testhost:1839/sitesassets/image/darwin.gif_.

Expected result:

The image is displayed.

Actual result:

An "HTTP Error 404.0 - Not Found" error is displayed.