View Full Version : EPubCheck errors -- any idea how to fix?


eggheadbooks1
06-24-2011, 08:39 PM
Hi:

I'm using the ePub export function in InDesign. My ePub passed ePubCheck but with the following errors/warnings:

1. ERROR: Baby Jane.epub/OEBPS/content.opf(4): date value '' is not valid. The date must be in the form YYYY, YYYY-MM or YYYY-MM-DD (e.g., "1993", "1993-05", or "1993-05-01"). See http://www.w3.org/TR/NOTE-datetime.
2. WARNING: Baby Jane.epub: item (OEBPS/Fonts/times.ttf) exists in the zip file, but is not declared in the OPF file
3. WARNING: Baby Jane.epub: item (OEBPS/Fonts/timesi.ttf) exists in the zip file, but is not declared in the OPF file
4. Check finished with warnings or errors!

Does anyone have any idea how I fix these?

Thanks in advance.

eggheadbooks1
06-24-2011, 08:40 PM
Sorry, should add that's InDesign CS5 for PC. I'm using 64-bit Win 7 Pro.

pholy
06-25-2011, 12:47 AM
These errors can be fixed by using a simple text editor - wordpad, not word - to make changes to the .opf file after you unzup the epub file. InDesign always leaves little crumbs that need fixing. See Liz Castro's book - EPUB Straight to the Point - which you can find at her blog (http://www.pigsgourdsandwikis.com/). Two other points: I'm not sure the Times font family is licensed for redistribution in the clear, and it is not really a good font for reading anything but newspapers. I'd recommend checking out Droid or Liberation font families, which were designed for computers displays and are licensed under the Open Font License. Of course, others will insist that you shouldn't be embedding a body font anyway. Anyway, go get the book and read it; it'll solve most of your problems with ebooks.

eggheadbooks1
06-25-2011, 02:17 AM
Don't really have time to try to get a book during a postal strike...

The date thing is an O/S issue -- I've figure out how to change it in Windows but I'm still getting an error, so it's a problem with InDesign. Thing is, there is no date anywhere in the XML, and certainly not where the error claims it is.

As for the font, I'm using an Open Type version. The problem isn't the font, it's whether I need to remove the font definitions from the CSS template or add them to the OPF.

SamL
06-25-2011, 04:09 AM
do you want embedded fonts in your epub, or just let the device choose the font? If your ok with letting the device pick the font, just delete the "fonts" folder, and it should validate. I usually stick to basic font, and don't embed any.

The date thing is just metadata. All epub have to have a date, and for some reason InDesign doesn't export the date in metadata. In your content.opf file put in:

<dc:date>2011-06-24</dc:date>

Just make sure its within the <metadata> tags at the top. You can also put it in in other formats such as YYYY, YYYY-MM

eggheadbooks1
06-25-2011, 04:29 AM
do you want embedded fonts in your epub, or just let the device choose the font? If your ok with letting the device pick the font, just delete the "fonts" folder, and it should validate. I usually stick to basic font, and don't embed any.

Because the embed fonts was the default, I was under the impression I had to embed the fonts. When I deselected that option, those errors disappeared.


The date thing is just metadata. All epub have to have a date, and for some reason InDesign doesn't export the date in metadata. In your content.opf file put in:

Here's the weird thing: I change the epub extension to zip, open it up using WinRar, and when I check the opf file there is code to close the date but not to open it: </dc:date> is all that appears.

So in Dreamweaver I changed it to <dc:date>2011-07</dc:date>. But when I rezip the file and change the zip extension to epub, the file no longer opens in ADE. I've also tried editing the code in Notepad, but no difference. If I do the unpack, rezip, change extension back to epub without amending the code, the epub opens again fine in ADE.

And it's that date that is all that now stands between me and a error-free epub. I could bang my head against the wall.

mrmikel
06-25-2011, 07:53 AM
The files must be in a certain order inside the epub.

This free tool allows you to edit the contents of the epub in your favorite text editor and puts it back together in order.

http://atlantiswordprocessor.blogspot.com/2009/11/tweaking-epubs-its-just-zip-file.html

This capability is found in Sigil and Calibre also.

SamL
06-25-2011, 12:20 PM
Because the embed fonts was the default, I was under the impression I had to embed the fonts. When I deselected that option, those errors disappeared.



Here's the weird thing: I change the epub extension to zip, open it up using WinRar, and when I check the opf file there is code to close the date but not to open it: </dc:date> is all that appears.

So in Dreamweaver I changed it to <dc:date>2011-07</dc:date>. But when I rezip the file and change the zip extension to epub, the file no longer opens in ADE. I've also tried editing the code in Notepad, but no difference. If I do the unpack, rezip, change extension back to epub without amending the code, the epub opens again fine in ADE.

And it's that date that is all that now stands between me and a error-free epub. I could bang my head against the wall.


I usually don't embed fonts myself. Too much hassel, and half of the readers I tested on ignore the embedded fonts anyways. so I use the fon't family property in the CSS.

SamL
06-25-2011, 12:27 PM
Because the embed fonts was the default, I was under the impression I had to embed the fonts. When I deselected that option, those errors disappeared.



Here's the weird thing: I change the epub extension to zip, open it up using WinRar, and when I check the opf file there is code to close the date but not to open it: </dc:date> is all that appears.

So in Dreamweaver I changed it to <dc:date>2011-07</dc:date>. But when I rezip the file and change the zip extension to epub, the file no longer opens in ADE. I've also tried editing the code in Notepad, but no difference. If I do the unpack, rezip, change extension back to epub without amending the code, the epub opens again fine in ADE.

And it's that date that is all that now stands between me and a error-free epub. I could bang my head against the wall.

Your almost there! I would guess its in the way that your repackaging your file back in to an epub. Sometimes it won't work to simply change your extension back to epub. I'm on a mac, but I use "epubzip" to do this for me.

Try this thread:
http://www.mobileread.com/forums/showthread.php?t=84675

it should help.

eggheadbooks1
06-25-2011, 01:36 PM
Your almost there! I would guess its in the way that your repackaging your file back in to an epub. Sometimes it won't work to simply change your extension back to epub. I'm on a mac, but I use "epubzip" to do this for me.

Try this thread:
http://www.mobileread.com/forums/showthread.php?t=84675

it should help.

Many thanks. Am off to try epubTweak and epubzip.

Michelle

eggheadbooks1
06-25-2011, 02:24 PM
SamL:

Just downloaded and tried epubTweak - YEAHHHHHHHHHHHHHHHHHHHHHHHHHH!

You are officially my hero today for directing me to it.

FYI, to Indesign users: not only does InDesign not export the date into the metadata, or the opening code, but the closing code it exports is also wrong: instead of </dc:date> it writes <dc:date/> (seriously, Adobe, you have HOW many techies working for you??). So I had to add <dc:date>[my date here] and also change the closing code, so I ended up with this:

<dc:date>2011-07</dc:date>

And voila! I am so happy now.

SamL
06-25-2011, 03:38 PM
SamL:

Just downloaded and tried epubTweak - YEAHHHHHHHHHHHHHHHHHHHHHHHHHH!

You are officially my hero today for directing me to it.

FYI, to Indesign users: not only does InDesign not export the date into the metadata, or the opening code, but the closing code it exports is also wrong: instead of </dc:date> it writes <dc:date/> (seriously, Adobe, you have HOW many techies working for you??). So I had to add <dc:date>[my date here] and also change the closing code, so I ended up with this:

<dc:date>2011-07</dc:date>

And voila! I am so happy now.

Hey glad I could help. I'm fairly new to all this too, and usually get great advice from this forum, so I try to pass it along.

Ya the date problem is a know bug in InDesign, they should wise-up to it eventually.

MMGray
07-25-2011, 08:33 PM
Hello all
I see others have hit the dreaded EPubCheck wall.
As a rank amateur, I'm somewhat daunted by what I might have to do to fix my error message from EPubCheck:

tmp_bbf8c22100ab10d723cd85f4d391274a_Hp3_YA.ch.fix ed.fc.tidied.stylehacked.xfixed_split_004.html(174 ): attribute "clear" not allowed here; expected attribute "class", "id", "style" or "title"

I used Smashwords and Word. There are no images in my book. The message on the screen seemed to suggest the file was too big. Is this possible? It's a file of 85,000 words.
Anyone in the community have a similar problem or who can interpret the error message for me?
Many thanks in advance.

JSWolf
07-25-2011, 08:49 PM
Can you post the code? Without, we can only guess.

pholy
07-25-2011, 09:12 PM
It looks like either Word or the meatgrinder put a 'clear' attribute inside a <p ...> tag where only the above listed attributes are allowed. Just why this happened may become apparent if you look at line 174 in xfixed_split_004.html and relate that back to what is in your Word file in that area. It could be a bug in the meatgrinder, or in your use of the rules in Smashwords style guide. I gather that they are fairly complicated, although I haven't tried to publish anything anywhere.

DiapDealer
07-25-2011, 09:24 PM
Can you post the code? Without, we can only guess.
No code, Jon. Just a Word doc and a meatgrinder.

You probably need to take it up with Smashwords, MMGray... since the errors in their meatgrinder's temporary html files don't really point back to anything meaningful/useful in your Word doc itself.

You could try saving your Word doc as unfiltered html and see if you can duplicate the 'clear' attribute inside a <p> element. It might narrow down where you need to look in your source doc. But that's all I got.

JSWolf
07-25-2011, 10:19 PM
Or you could convert the Word doc to ePub using Calibre and see if you can duplicate the error.

MMGray
07-26-2011, 08:19 PM
Yikes
Many thanks for the speedy responses.
I will attempt various suggestions.
For those of us who want to focus on the e-writing (in the hope the algorithms will work like a charm) having to wade through fixups can lead to much gnashing of teeth.
Stay tuned to the outcome.
MMGray

st_albert
07-26-2011, 09:05 PM
Sorry if this has been dealt with before, but I'm curious... Could one fix the epub itself and re-upload it to smashwords, or are you required to start with an MS-word doc file only?

I'm asking because this forum contains a legion of posts regarding epubcheck errors in epubs generated by the meatgrinder from (allegedly) Smashwords-style-compliant Word doc files, and from what I can tell there is no known simple correspondence between those errors and the "code" in the word file that produces them. Is the problem in the Word doc? or is it a bug in the meatgrinder? Who knows?

In any event, life would be simplified if one could submit a "corrected" epub to Smashwords.

DiapDealer
07-27-2011, 02:47 PM
In any event, life would be simplified if one could submit a "corrected" epub to Smashwords.
Yes it would, but Smashwords do not accept epub submissions at this time.

MMGray
07-28-2011, 01:43 PM
My husband who "meatgrindered" his ebook one week before me successfully suggested I use our new iMac to submit (which is what he did).

So I re-submitted my ebook to Smashwords yesterday using our new machine and wait to see what the Apple store does with it. Apparently using Word on different Macs of different vintages (which is what I did) can be the culprit.
Rats! Apple should know better than to manufacture machines that still work eons later [such as our dinky little Macintosh SE!]...

I thought all had gone well the first time -- but no, Apple store was the wall I hit with the EPubCheck -- so it may be a waiting game.
I have downloaded Calibre and have that as my Plan B plus all the other suggestions.
Regards to the Forum
MMGray