HTML Errors in EPUB3 Oputput

User avatar
DavidWSnow
Posts: 97
Joined: Wed Jun 22, 2016 10:25 pm
Platform: Mac
Location: Outside Seattle Washington

Sat Dec 16, 2017 10:55 pm Post

I finally got my converted book to look ok in epub2 and went on to try EPUB3.
I got errors! I am not sure how many because the tools only tell you about the first, but I saw several others in the HTML
Attached are three images: The input, The error message, the actual html.

The html error is that there is an ending </h2> tag and no beginning one. I see this on each item in the list.
Attachments
Epub3 HTML.png
Epub3 HTML.png (112.21 KiB) Viewed 1317 times
Error Text.png
Error Text.png (30.25 KiB) Viewed 1317 times
Input.png
Input.png (111.48 KiB) Viewed 1317 times

User avatar
DavidWSnow
Posts: 97
Joined: Wed Jun 22, 2016 10:25 pm
Platform: Mac
Location: Outside Seattle Washington

Sun Dec 17, 2017 5:27 pm Post

I did some more testing and removing all formatting and links in this selection makes the error go away. This isn't surprising. But considering that the Heading 2 above this section is correctly ended, I don't know why the extra ending </h2> are coming from.

Boy-oh-boy is it great to have a nice and simple single CSS stylesheet with EPUB3 --- THANKS
I moved the text to a test page at the front of the book and tried several things:
    Removing the links didn’t help
    Making the em-dashes consistent didn’t help. They had been a mix of en-dashes and em-dashes with and without spaces before.
    Undoing and re-doing the list didn’t help
    Undoing the list did help!!!

Of course, I have a couple of dozen other lists that work just fine - so good luck finding the source of the bug.

It does compile as a KF8 and can be viewed with Calibre and Kindle Previewer 3 (very slowly) without error.
BTW it looks Better as an EPUB3 than it does as KF8.

I removed the problem text for the time being and recompiled. This is the only compile error in a text that is 170 8.5x11" pages has 50+ images/figures and lots of lists & links.

I can send you my test file if that will help. BTW how do I extract a single document from the binder and send it?

/Dave

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

Mon Dec 18, 2017 1:54 am Post

David, can you try to make a minimal test case Scrivener Project that reproduces this potential bug then zip it up and attach it here? Without a test case it is impossible to get any further.

User avatar
DavidWSnow
Posts: 97
Joined: Wed Jun 22, 2016 10:25 pm
Platform: Mac
Location: Outside Seattle Washington

Mon Dec 18, 2017 6:33 pm Post

I have a zippe-up small project (1.1MB) and can't attach it here since it is too big. Tell me how you want it.

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

Tue Dec 19, 2017 1:47 am Post

If the malformed HTML is reproducible, you could send it to L&L support directly with a link to this thread, or if you want confirmation from another user before that then use something like https://workupload.com/

User avatar
DavidWSnow
Posts: 97
Joined: Wed Jun 22, 2016 10:25 pm
Platform: Mac
Location: Outside Seattle Washington

Tue Dec 19, 2017 10:54 pm Post

I made a really really small project with the bug. Here is a zipped up copy
Attachments
V3Bug.scriv.zip
(279.15 KiB) Downloaded 63 times

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

Wed Dec 20, 2017 9:03 am Post

I *think* I understand what is going. There is something really weird in the styles for that document. I have simplified it to only 2 list items. I remove the list formatting, and make sure the text is "No Style", then I make it a bulleted list and the text becomes "Heading 1" style (but does NOT look like Heading 1 style (bold etc.), visually it is still No Style). If I select the text in one list item and try to unset the style (NoStyle via ⌘⌥0), then it looks like Heading 1. Then I have to unset it again.

When the text is in this indeterminate state (says Heading 1 but looks No Style), then the HTML corruption occurs. The compile format also has a Heading 1 style which is centered and why the HTML seems to get mangled.

I've made a simpler test case from yours with screenshots showing what happened.

Keith: any ideas what is going on? The second list item in the test case ("EPUB3 Bug" doc text starts Manuale) says it is Heading 1 when it isn't, and this seems to cause output HTML errors...
Attachments
V3Bug2.zip
(164.27 KiB) Downloaded 65 times

User avatar
KB
Site Admin
Posts: 20114
Joined: Tue Jun 13, 2006 11:23 pm
Platform: Mac
Location: Truro, Cornwall
Contact:

Wed Dec 20, 2017 6:28 pm Post

Thanks for the test projects. This is now fixed for 3.0.1.
"You can't waltz in here, use my toaster, and start spouting universal truths without qualification."

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

Thu Dec 21, 2017 1:17 am Post

I can confirm the HTML output errors are fixed, thanks Keith! The style problem in the editor persists in V3.0.1. I made a screencast demonstrating the issue. The list item claims it is "Heading 1" when it isn't (visually). Setting it to "No Style" paradoxically makes it look like Heading 1 and you cannot use "No style" again, it doesn't work. You have to remove the list, then set "No Style", then redo the list:

stuck_style_0_0.mp4.zip
(478.42 KiB) Downloaded 62 times

User avatar
KB
Site Admin
Posts: 20114
Joined: Tue Jun 13, 2006 11:23 pm
Platform: Mac
Location: Truro, Cornwall
Contact:

Thu Dec 21, 2017 1:58 pm Post

There's no bug in that video:

1. There's nothing wrong with a paragraph having a style associated with it even if it looks nothing like that style. If you apply a style and then change the formatting of the paragraph, the style will remain (just as it does in Word etc).

2. To remove a style from a paragraph, you either need to click into the paragraph with no selection, or select the *whole* paragraph. In the video you were not selecting the whole paragraph (because you did not select the bullet). If it didn't work like this, there would be no way to clear character styles without also clearing paragraph styles.
"You can't waltz in here, use my toaster, and start spouting universal truths without qualification."

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

Sun Dec 24, 2017 12:35 am Post

Yes this all makes sense. I normally use Pandoc lists for my writing and the only RTF like lists I use are Word lists where you cannot select the bullet, and this was where I was going wrong. Thanks Keith!