AI OnAI Off
If anyone is interested, I simply added a Try/Catch statement to the Set method of the State property to return an empty PropertyImageUrl if a problem is encountered when parsing the image URL string to PropertyImageUrl. Like so:
Set(ByVal value As String)
Dim values As String() = value.Split("|")
If value.Length > 0 Then
Try
strImageURL.ParseToSelf(ASCIIEncoding.ASCII.GetString(Convert.FromBase64String(values(0))))
Catch ex As Exception
strImageURL = New PropertyImageUrl
End Try
End If
End Set
This, at least, allows the page import process to continue, regardless of whether the image is found. Still, it's a shame that the export process fails to include the image as part of the export (assuming you have the "Export files that the pages link to" checkbox checked).
Hi folks,
I've come across an extremely frustrating problem when importing pages that include Dynamic Content (which implement a PropertyImageUrl). The import checks that the path contained in the PropertyImageUrl is a valid path, and as such, the import works correctly if the page containing the Dynamic Content has been exported from the same site (because the image exists at the original location). However, if I attempt to import the page to a different EpiServer site (i.e. from a staging to a live site), the import fails because - despite the fact that I've checked the option to export files that the page links to - the system can't find the image at the specified path.
The import error is as follows:
The following errors have occurred:
[Importing page 12736_25837] Exception: "/pages/28404/identity_gallery_1.jpg" is not a valid value for "Image (max width/height 600px)".[]