Following error appears: An "image" content type exists, but there is no imagefile field defined.
I have 'image' content type, and have defined a field in it for images, yet I continue to see this error. I reinstalled ImageField module, but still not working. Suggestions? Need more info?

Also, the actual HTML file created isn't particularly good, it is inserting nbsp; incorrectly so it is being displayed in the file, and the numbers in the table of contents are smushing together with the header text. =( I get a better output if I stick the word html file into Dreamweaver and do a clean on it there first, then upload it.

Any plans to eventually be able to just upload a Word Doc and have it convert?

Comments

tmcw’s picture

Is your ImageField in the content type named 'imagefile'? It needs to be.

The output is a work in progress: I've made some strides with the quality, but it's a very difficult task to do it programmatically, since Word HTML chokes most XML/HTML parsers. Check that you're using a very liberal input filter for the body text (Full HTML, for example), since the defaults can mess with output.

Uploading a .doc file is probably never going to happen: it's a binary format and one that changes dramatically from version to version. Extracting text from .doc files is fairly possible; preserving any formatting is a long shot.

coderintherye’s picture

Hi thanks for fast response. No, my content type was named 'image' I think the documentation should say create a content type 'imagefile' cause I didn't see that anywhere.

As far as .doc, I completely agree with your assessment of the difficulty of working with Word Docs, but it is something that has to be done, no matter what the open-source only folks say. I have to deliver functionality to my clients allowing them to upload and convert Word Docs.

Fortunately, there seems to be some hope on the horizon with the DocImport API project which is in Google SoC: http://drupal.org/project/docapi

There was also some talk from another project of using OpenOffice tools to convert Word -> Open Office Doc -> XHTML. This would also be a good solution.

I'm willing to help in regards to building this functionality, but am still learning PHP, so cannot offer much as of yet.

tmcw’s picture

The ImageField field should be called imagefile: not the content type. The content type should be called image.

Allowing zip files to be uploaded (to avoid jumping through the hoop of uploading images individually) is planned, but using Save As... vs Save As Web... doesn't seem to make a big difference. I'm also hesitant about OpenOffice tools because they simply will not run on 90% of shared hosts, and for the 10% VPS or managed hosts they can run on, they are difficult to install. Hopefully a site like Zamzar will offer an API that another module will harness, but for the time being, it's not going to happen in this module.

tmcw’s picture

Assigned: Unassigned » tmcw
coderintherye’s picture

Hmm, well honestly don't know what the problem is then cause I had Content type as image and field as imagefile.

I agree with your hopes on ZamZar, they are a good service and have helped me in quite a few pinches.

tmcw’s picture

Go to Content Types -> image -> Manage fields. If your imagefile field doesn't have the Name column of field_imagefile, then there's the problem. Otherwise, I have no idea where the error could be coming from.

sumitk’s picture

Status: Active » Closed (fixed)

no activity so closing