This error occurred after an upgrade from Episerver CMS 5 to CMS 6 R2. When trying to publish a page this error message was shown: “urltoimage.jpg” is not a valid value for “imageproperty”
Vladimir Terziyski wrote the following about why this error is happening:
“I’ve had the same problem some time ago. I’ve narrowed it down to using Native or other custom Virtual path provider. Seems it comes from the new base class for url properties called PropertyFileUrl, from which PropertyImageUrl and PropertyDocumentUrl inherit. It has one method called ValidateUri which throws an exception when the VirtualPathProvider you use doesn’t implement IFileResolver interface. For example - VirtualPathNativeProvider. Here is what is happening:
- The user saves & publishes the page.
- A call to Set accessor for the PropertyUrl.String property is made. Inside it, a call to PropertyFileUrl.ValidateUri method is made
- ValidateUri throws an exception which says that the url is not absolute on the following line:
- This exception however is masked behind the text “[imagepath] is not a valid value for [imagepropertyname]”. This text is shown as error in the Edit interface.
- If the selected VirtualPathProvider implements IFileResolver, call to ValidateUri will not be made if the file is resolved.”
How to solve the problem
- Download the latest release of Episerver CMS 6 R2 from episerver world.
- Backup your site and database
- Uninstall EPiServerFramework from the control panel
- Uninstall EPiserverCMS
- Install EPiServerShared.msi from the latest release of CMS 6 R2
- Install EPiServerFramework.msi
- Copy assemblies from Program Files (x86)\EPiServer\CMS\6.1.379.0\bin to the site’s bin folder.
- Copy assemblies from Program Files (x86)\EPiServer\Framework\6.2.267.1\bin to the site’s bin folder.
- run an iisreset
These instructions + instructions for Relate can be found here.