I’m trying to export some old content from our CMS 4.7 installation to archive. The cms2xp tool seems to export all the content fine but the images are not exported.
private boolean isConvertible( final ContentTypeEntity ct )
{
final ContentHandlerName name = ct.getContentHandlerName();
return name == ContentHandlerName.CUSTOM || name == ContentHandlerName.FORM || name == ContentHandlerName.NEWSLETTER;
}
This is the contentype in cms that I would assume is very standard? Anyone else had this issue?
I suspect that the problem is that the Content handler is of type “Images” and not “Image”. “Images” was deprecated in Enonic CMS version 4.4, if I remember correctly. IIRC some differences between “Images” and “Image” was that the former has a different XPath to the binary attachment, and that the former didn’t support caching and scaling filters using createImageUrl but instead needed a reference to the binary using the key parameter.
You’re probably not completely screwed, as I think the image binaries still are stored in the blobstore, but extracting them while also keeping their correct metadata could require a bit of hard work.
Hold on a sec - I could be confusing a content handler with the type=“images” vs. type=“image” deprecation in a contenttype definition. In that case, your problem could be caused by something completely different.
Are other binaries such as files and/or other image content types exported without problems? If not, the problem could be simpler in nature, like not having configured the path to the blobstore properly.
I’ve figured it out. The problem was not the image types but the include filter in the cms2xp tool. The contentPath has to match something on the parent level to work. In the exampe config it looks like you can have child paths too but the code looks like this in ContentFilter.isCategoryIncluded()
if ( path.equals( includePath )
So changing this turns out to works better. Maybe some other cases that would break but works for me. Case closed