epub validator "Duplicate ID" image error

User avatar
ighulme
Posts: 86
Joined: Sat Oct 25, 2014 12:55 pm
Platform: Mac + Windows
Contact:

Fri Dec 22, 2017 9:52 am Post

Hi,

I'm trying to validate my epub file at http://validator.idpf.org/ and I get the error messages for my separator images:

Error while parsing file 'Duplicate ID 's1.png''.

In the compiled html file I can see that each separator image is given the attribute: "id=s1.png"

Is it possible to give the images unique id's before compiling?

I am adding them within the text by using placeholders:

<$IMG: /path/to/file/Images/s1.png;W=300>

Thanks in advance for any help,
Ian
I G HULME
The Heavenfield: http://www.heavenfield.com

User avatar
ighulme
Posts: 86
Joined: Sat Oct 25, 2014 12:55 pm
Platform: Mac + Windows
Contact:

Fri Dec 22, 2017 10:21 am Post

hmmm, I just installed the latest 3.01 update to see if it would fix this, and I still have the same errors and it seems to have introduced a new one.

Now, in the Contents.html file I get the following error:

Error while parsing file 'element "p" not allowed here; expected element "h1", "h2", "h3", "h4", "h5", "h6", "hgroup" or "ol"'.

It seems that the auto-generated table of contents is adding a page title using the paragraph tag:

<p class="page-title">TABLE OF CONTENTS</p>


I've just checked an old set of source files and the Title is created using a List tag:

<li style="text-align: center"><span class="front-matter-centred">TABLE OF CONTENTS</span>


Perhaps this is a bug that has crept into the Compiler, and it needs to be given a Heading tag?

---

The update does appear to have changed the way the id for each image is created - before it added the file extension as well as the name.
Now, only the name is in the id, but, because it is not unique when the same image is used multiple times, the validator is giving errors.
I G HULME
The Heavenfield: http://www.heavenfield.com

mp
mprefit
Posts: 2
Joined: Fri Dec 22, 2017 12:42 pm
Platform: Mac

Fri Dec 22, 2017 2:39 pm Post

Hi,

Thank you.
If I receive an answer I will send it to you.

Regards,
Mihnea

User avatar
nontroppo
Posts: 926
Joined: Mon Mar 05, 2007 5:22 pm
Platform: Mac
Location: Airstrip One

Fri Dec 22, 2017 4:10 pm Post

If you manually change <p> to <h2> then validation works...

Regarding duplicate #id – yes this seems to be a bug, but doubt it will break anything...

User avatar
ighulme
Posts: 86
Joined: Sat Oct 25, 2014 12:55 pm
Platform: Mac + Windows
Contact:

Fri Dec 22, 2017 6:00 pm Post

seems to be a bug, but doubt it will break anything...


Sadly, if it doesn't validate I get rejected from the Smashwords premium.

I could manually change the ids and the <p> tags in the html files but I don't really know how to make it into an epub after that.
I was hoping to keep it all in Scrivener.
I G HULME
The Heavenfield: http://www.heavenfield.com

User avatar
nontroppo
Posts: 926
Joined: Mon Mar 05, 2007 5:22 pm
Platform: Mac
Location: Airstrip One

Sat Dec 23, 2017 1:32 am Post

OK so the only temporary solution is to edit manually until Keith fixes this.

The other spec violation has a workaround: http://literatureandlatte.com/forum/vie ... 93#p255893

User avatar
ighulme
Posts: 86
Joined: Sat Oct 25, 2014 12:55 pm
Platform: Mac + Windows
Contact:

Sat Dec 23, 2017 6:15 pm Post

OK so the only temporary solution is to edit manually until Keith fixes this.


Once I've edited the source files do I need some different software to create an epub file from these?
I G HULME
The Heavenfield: http://www.heavenfield.com

User avatar
nontroppo
Posts: 926
Joined: Mon Mar 05, 2007 5:22 pm
Platform: Mac
Location: Airstrip One

Sun Dec 24, 2017 1:15 am Post

Calibre's EBook Editor can edit EPubs directly, no need to unzip/rezip etc. The other way is Scrivener has a neat option "Save source files in a folder with EPub file", that creates an unzipped source file folder you can edit in any editor and a command to compile the EPub for you from the modified source. See page 562 of the user manual (which also recommends Calibre's editor)... If your final format in kindle then I think you will need to run kindlegen manually on the modified EPub...

User avatar
ighulme
Posts: 86
Joined: Sat Oct 25, 2014 12:55 pm
Platform: Mac + Windows
Contact:

Sun Dec 24, 2017 10:19 am Post

Calibre's EBook Editor can edit EPubs directly, no need to unzip/rezip etc.


Thanks for the advice - I'll have a look into it as a solution while I wait for a Scrivener update.
I G HULME
The Heavenfield: http://www.heavenfield.com

User avatar
ighulme
Posts: 86
Joined: Sat Oct 25, 2014 12:55 pm
Platform: Mac + Windows
Contact:

Fri Dec 29, 2017 1:03 pm Post

Just wanted to ask if anyone knew whether this issue was something that Keith is aware of now, or whether I should post it in the Bug section of the forum?
I G HULME
The Heavenfield: http://www.heavenfield.com

User avatar
nontroppo
Posts: 926
Joined: Mon Mar 05, 2007 5:22 pm
Platform: Mac
Location: Airstrip One

Tue Jan 02, 2018 2:38 pm Post

It wouldn't do any harm to make a bug post on the #id problem and also remind about the nav error (many people reported that so I'm sure it's on the radar)...