ePub Validation errors

I’m having a tough time compiling to ePub. The validation offers up lots of errors and warnings and I can’t open my work on my iPad.

Ideas?

Thanks in advance for your help.

It’s hard to say without knowing what the warnings are. Generally speaking the ePub files coming out of Scrivener are pretty clean, though, so the nature of the warnings should be enlightening. What happens if you open the ePub file in Sigil and check with its validation?

Thanks for the quick reply.
When I opened the project with Sigil I got this message:

Unable to read OPF file.
Line: 14 Column 20 - Unexpected ‘’.

When I run EPUB Validator, I get a big list with two errors like this:

ERROR OPS/content.opf 14 20 An invalid XML character (Unicode: 0x3) was found in the element content of the document.

And lots of things like these:

WARNING -1 -1 item (OPS/body47.xhtml) exists in the zip file, but is not declared in the OPF file

Does this help?

Okay, thanks, yes that does potentially help. This file contains the meta-data that you added in the compile phase. It looks like a control character slipped into one of these fields. If you open the content.opf file in Sigil, does it display the whole file? If so, check line 14. That should give you a clue as to which meta-data field has the bad character in the compile settings. Just clear out that field and type it in again from scratch and see if that works.

So I opened the content.opf file in Sigil and it only had 13 lines.

Hmm, sounds like the character is messing up Sigil’s text editor too. Well you should try rebuilding all of the meta-data in Scrivener’s compile option pane then.

As I look at the meta-data in the compile option pain, I’m not noticing anything out of the ordinary at all. Should I just re-enter what’s already there?

The problem is a control Unicode character, which is unprintable, you wouldn’t be able to see it. You can look at the OPF file and see which meta-data fields are in there. Any that aren’t are suspect, and yes the best way to get rid of the character will be to select the whole text field, delete it, and retype it.

Interesting. It worked, but then each time I compile I have to continually re-type all the meta-data in order for it to work. Bug?

Hmm, that is strange. So it worked once—but then if you compile again it breaks unless you re-type? That does sound like a bug. Could you send us the compile settings? Just make a preset out of them in the “Format As” menu. There is a management option at the bottom. Click the + button to make a preset, and then use the Export button to save it as a file. Send it to our support address, attn: Ioa, and I’ll have a look at it.

Bizarrely, it’s working now.
Now I’m just tweaking and re-tweaking in order to get the formatting just right. Keeps showing up as clean though.
Thanks so much. Truly enjoy the product.

Okay great! Well let’s cross our fingers and hope it stays that way. Those weird control characters can be a pain to find and get rid of, but thankfully it’s also kind of hard to make them, so once they are gone they should stay gone.