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

These steps are for Alloy sample site.
Steps to reproduce:
1) Access Admin mode, enable "English" - "en" and "English (United States)" - "end-US"
2) Setup multiple sites. The main site has 'en' master language (site A), the secondary site has 'en-US' master language (site B). Site B just contains a start page.
3) In the "Manage Websites" of Admin mode, check "Use site-specific assets" for both sites.
Configure site A with Culture = en, Type = Primary, Scheme = HTTP.
Configure site B with Culture = en-US, Type = Primary, Scheme = HTTP.
Please remember to remove the wildcard host name.
4) Go back to Edit mode. Select site A. On the right pane, select "Media". Under "For This Site", create a folder named "image".
5) Upload an image to "image" folder.
6) Select a page that has version in "en" only, i.e: Alloy Meet. Add the uploaded image to "Teaser image" of this page. Then publish this page.
7) Export "Alloy Meet" from site A by going to Admin mode -> Tools -> Select "Export Data". Click on "Export content items", leave the default options selected then export.
8) Import "Alloy Meet" to site B by going to Admin mode -> Tools -> Select "Import Data". Uploate the previous export file. Please remember to check the "Update existing content items with matching ID", select "English (United States)" in this step.
Please note that the page exported does not have a en-us language version! However, some content has been imported.
9) Navigate back to site B, look into the Media assets pane. The image in the "image" folder imported
10) 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
11) Browse this URL "http://testhost:1839/sitesassets/image/darwin.gif"
Expected: image displayed
Actual: "HTTP Error 404.0 - Not Found" exposed
Please take a look at the attachment for more details.