Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 07-14-2024, 12:46 AM   #1
RbnJrg
Wizard
RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.
 
Posts: 1,610
Karma: 8399999
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
A bug in Sigil?

Hi Kevin and Diap;

In my epubs (3), sometimes I add a javascript to the nav.xhtml file and when I do that, the property "scripted" is not added in the .opf file. That is not a big problem because I can add that property by hand (and I do that), but the issue arises when Sigil open the epub because the property added by me, is erased; I have to do the thing every time that Sigil opens the ebook. Could you fix that in the next Sigil version?

Many thanks in advance.
RbnJrg is offline   Reply With Quote
Old 07-14-2024, 03:09 AM   #2
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 40,457
Karma: 156982136
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
If you use the ePub3 Tools item in the Tools menu and click on Update Manifest Properties, does this correct the error(s) for you. I haven't tried it with a js linked to the nav document, but it works for standard html documents though I seem to recall at one point, reading that what the navigation document can contain is limited and javascript was not listed as a allowed item. Now if I could find that reference...

Edit: The reference basically stated that since the navigation document is intended to be machine readable, javascript should not be used. Instead make the navigation document hidden and create an dedicated for human use html ToC. So perhaps a nav.xhtml navigation document and a toc.xhtml human intended ToC.

Last edited by DNSB; 07-14-2024 at 03:21 AM.
DNSB is online now   Reply With Quote
Advert
Old 07-14-2024, 09:05 AM   #3
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 8,156
Karma: 5450818
Join Date: Nov 2009
Device: many
I will look into it. That property should not be erased if present on loading of any epub if it already exists in the opf manifest for any file.
KevinH is offline   Reply With Quote
Old 07-14-2024, 05:08 PM   #4
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 8,156
Karma: 5450818
Join Date: Nov 2009
Device: many
Yes the SetNavResource() in the OPFResouce is the issue as it just assigns the nav overwriting any other properties.

Also the Epub3 Update Manifest Properties Tool needs to be allowed to work on the nav.

I will try to get a fix for both done soon.
KevinH is offline   Reply With Quote
Old 07-14-2024, 06:16 PM   #5
RbnJrg
Wizard
RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.
 
Posts: 1,610
Karma: 8399999
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
Quote:
Originally Posted by DNSB View Post
If you use the ePub3 Tools item in the Tools menu and click on Update Manifest Properties, does this correct the error(s) for you. I haven't tried it with a js linked to the nav document, but it works for standard html documents though I seem to recall at one point, reading that what the navigation document can contain is limited and javascript was not listed as a allowed item. Now if I could find that reference...

Edit: The reference basically stated that since the navigation document is intended to be machine readable, javascript should not be used. Instead make the navigation document hidden and create an dedicated for human use html ToC. So perhaps a nav.xhtml navigation document and a toc.xhtml human intended ToC.
Yes, but the issue is that the property is erased when Sigil loads the epub. And Epubcheck allows the property "scripted" for nav.xhtml (in the .opf, property="nav scripted").
RbnJrg is offline   Reply With Quote
Advert
Old 07-14-2024, 07:56 PM   #6
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 40,457
Karma: 156982136
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by RbnJrg View Post
Yes, but the issue is that the property is erased when Sigil loads the epub. And Epubcheck allows the property "scripted" for nav.xhtml (in the .opf, property="nav scripted").
I'm not disagreeing that allowing the scripted property for the nav document is not prohibited. What I got from the article I read and made a couple of notes from is that the authors did not recommend using javascript in the nav document since it could cause issues with the renderer's ability to parse the file. Their suggested workaround was a vanilla navigation document that was hidden and a ToC file that could be fancified without needing to worry about the renderer parsing it.
DNSB is online now   Reply With Quote
Old 07-15-2024, 01:18 AM   #7
RbnJrg
Wizard
RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.
 
Posts: 1,610
Karma: 8399999
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
Quote:
Originally Posted by DNSB View Post
I'm not disagreeing that allowing the scripted property for the nav document is not prohibited. What I got from the article I read and made a couple of notes from is that the authors did not recommend using javascript in the nav document since it could cause issues with the renderer's ability to parse the file. Their suggested workaround was a vanilla navigation document that was hidden and a ToC file that could be fancified without needing to worry about the renderer parsing it.
So far, I never had an issue for including a .js file in nav.xhtml. Sometime ago, I used both (in the same epub), the nav.xhtml an a xhtml toc, but as some ereaders had issues about not to show the nav.xhtml, I decided to do full visible the nav and not to include the toc. And as told you before, I didn't have any issue so far by including there a .js file (Readium and Webkit seem to handle that very well). Maybe this happens because the script doesn't change the structure of nav.xhtml; it only changes some .css styles.

Last edited by RbnJrg; 07-15-2024 at 01:22 AM.
RbnJrg is offline   Reply With Quote
Old 07-15-2024, 01:40 PM   #8
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 40,457
Karma: 156982136
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by RbnJrg View Post
So far, I never had an issue for including a .js file in nav.xhtml. Sometime ago, I used both (in the same epub), the nav.xhtml an a xhtml toc, but as some ereaders had issues about not to show the nav.xhtml, I decided to do full visible the nav and not to include the toc. And as told you before, I didn't have any issue so far by including there a .js file (Readium and Webkit seem to handle that very well). Maybe this happens because the script doesn't change the structure of nav.xhtml; it only changes some .css styles.
That is quite possible. The sample shown in the item I read modified the structure of the human readable depending on the size of the screen so a large screen (iPad for instance) would show the pagelist while a smaller screen (Kobo Glo) would only show the ToC. I can't find the original article which was linked off Liz Castro's Pigs, Gourds and Wikis page quite a few years back though I did add to my 404 collection. Sheesh, it's only been 12 years...
DNSB is online now   Reply With Quote
Old 07-15-2024, 05:40 PM   #9
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 8,156
Karma: 5450818
Join Date: Nov 2009
Device: many
This should now be fixed in master.
Thank you for your bug report!
KevinH is offline   Reply With Quote
Old 07-16-2024, 12:40 AM   #10
RbnJrg
Wizard
RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.
 
Posts: 1,610
Karma: 8399999
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
Quote:
Originally Posted by KevinH View Post
This should now be fixed in master.
Thank you for your bug report!
Many thanks Kevin!
RbnJrg is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
A new bug in Sigil 0.9.12? RbnJrg Sigil 6 03-07-2019 08:20 AM
Bug in Sigil 0.9.5 PKTC Sigil 6 04-05-2016 01:33 PM
Possible Bug in Sigil 0.8.7 dragon reader Sigil 34 11-19-2015 12:45 PM
possible h1 bug in Sigil 0.6.1? michaelbr Sigil 2 12-04-2012 08:56 PM


All times are GMT -4. The time now is 08:31 PM.


MobileRead.com is a privately owned, operated and funded community.