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.
I suspect that problem is our image contenttype in cms is of type = “image” that I guess is the default? and that this validation then failes? cms2xp/ContentTypeConverter.java at 9a301cfebcf467d07348b311275ad49deb534301 · enonic/cms2xp · GitHub
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.
I guess CMS2xp could be adapted to handle “images” Also. Is the code clear enough for you to see how? If not file a ticket and we can try to help.
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.
good point. There were no errors but maybe that’s the case. Ill look into that
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
if ( includePath.startsWith(path)