Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 06-23-2016, 05:27 AM   #1
GrannyGrump
Obsessively Dedicated...
GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.
 
GrannyGrump's Avatar
 
Posts: 3,221
Karma: 35037583
Join Date: May 2011
Location: PA {back in the usa!}
Device: Sony PRS-T2, ADE on PC
Split on Markers --- Breaks existing links

Using v 0.8.6 portable on Win8.1 (also tried with v 0.9.5 portable on Win7).

I have the split markers inserted, as I always do. I have a separate xhtml file as a List of Illustrations, with links to the divs holding the images. I have another separate Footnotes file, also with links.

When I use the command "Split at Markers" --- The Footnotes links update automatically, as they should, going from this:

Code:
<body>
  <div class="chaphead">
    <h2 class="botmspace" id="fnot">FOOTNOTES:<br />
    &nbsp;</h2>
  </div>

  <div class="fnote">
    <a href="../Text/TENT.xhtml#fnc-01" id="fnt-01">[1]&nbsp;&nbsp;—</a> The ordinary .....
  </div>

  <div class="fnote">
    <a href="../Text/TENT.xhtml#fnc-02" id="fnt-02">[2]&nbsp;&nbsp;—</a> When this ....  </div>
To this:
Code:
<body>
  <div class="chaphead">
    <h2 class="botmspace" id="fnot">FOOTNOTES:<br />
    &nbsp;</h2>
  </div>

  <div class="fnote">
    <a href="../Text/TENT_0004.xhtml#fnc-01" id="fnt-01">[1]&nbsp;&nbsp;—</a> The ordinary ....
  </div>

  <div class="fnote">
    <a href="../Text/TENT_0008.xhtml#fnc-02" id="fnt-02">[2]&nbsp;&nbsp;—</a> When this ....  </div>

The LOI, however, goes from this:
Code:
<body>
  <div class="chaphead">
    <h2 id="loi" title="List of Illustrations">ILLUSTRATIONS</h2>
  </div>

  <div class="fmattr">
    <div class="sgc-toc-level-p">
      <a href="../Text/TENT.xhtml#ttd-01">It was ...</a>
    </div>

    <div class="sgc-toc-level-p">
      <a href="../Text/TENT.xhtml#ttd-02">A marvel...</a>
    </div>

    <div class="sgc-toc-level-p">
      <a href="../Text/TENT.xhtml#ttd-03">We anointed ...</a>
    </div>
To this, completely deleting the file-name(s):
Code:
<body>
  <div class="chaphead">
    <h2 id="loi" title="List of Illustrations">ILLUSTRATIONS</h2>
  </div>

  <div class="fmattr">
    <div class="sgc-toc-level-p">
      <a href="../Text/#ttd-01">It was...</a>
    </div>

    <div class="sgc-toc-level-p">
      <a href="../Text/#ttd-02">A marvel...</a>
    </div>

    <div class="sgc-toc-level-p">
      <a href="../Text/#ttd-03">We anointed...</a>
    </div>
I did this same operation last week on a very similar book which has almost identical layout, formatting, css, etc --- EXCEPT that one had no Footnotes page/file. That book worked flawlessly. I did try deleting the Footnotes file in this problem book, just in case Sigil is having a problem simultaneously dealing with more than one file that contains multiple links, but that made no difference --- links continue to break.

I have not had this problem since v 0.7.4. (see here: https://www.mobileread.com/forums/sho...d.php?t=231360 ) Obviously, there must be something peculiar to the book I am currently editing, but I can't find the gremlin.

I am attaching the UN-SPLIT draft versions of both the books, in case better eyes than mine (meaning 99% of the planet's population) can find a reason for the different behaviors. (By the way, it made no difference whether or not the images were included in the epub, so I deleted those for the attached files.)

Here, I am only dealing with 19 broken links, and it would not be too painful to correct them manually, but I have an up-coming project with several hundred links, and I want to correct my bad behavior before I dig into that one.

Thanks very much for any advice!
Attached Files
File Type: epub TENT--SPLIT-WONT-WORK.epub (114.5 KB, 218 views)
File Type: epub ARCADY--SPLIT-WILL-WORK.epub (104.5 KB, 149 views)
GrannyGrump is offline   Reply With Quote
Old 06-23-2016, 06:21 AM   #2
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,727
Karma: 24031401
Join Date: Dec 2010
Device: Kindle PW2
@GrannyGrump: I checked TENT--SPLIT-WONT-WORK.epub with epubcheck and found lots of missing fragment ids for LOI targets:

Spoiler:
Code:
Validating using EPUB version 2.0.1 rules.
(https://github.com/IDPF/epubcheck)

June 23, 2016 12:18:20 PM CEST


---------------------------------------------------

ERROR (RSC-007) at "TENT--SPLIT-WONT-WORK.epub/OEBPS/Text/cover.xhtml" (line 22, col 259):
   Referenced resource could not be found in the EPUB.

ERROR (RSC-012) at "TENT--SPLIT-WONT-WORK.epub/OEBPS/Text/loi.xhtml" (line 19, col 43):
   Fragment identifier is not defined.

ERROR (RSC-012) at "TENT--SPLIT-WONT-WORK.epub/OEBPS/Text/loi.xhtml" (line 23, col 43):
   Fragment identifier is not defined.

ERROR (RSC-012) at "TENT--SPLIT-WONT-WORK.epub/OEBPS/Text/loi.xhtml" (line 27, col 43):
   Fragment identifier is not defined.

ERROR (RSC-012) at "TENT--SPLIT-WONT-WORK.epub/OEBPS/Text/loi.xhtml" (line 31, col 43):
   Fragment identifier is not defined.

ERROR (RSC-012) at "TENT--SPLIT-WONT-WORK.epub/OEBPS/Text/loi.xhtml" (line 35, col 43):
   Fragment identifier is not defined.

ERROR (RSC-012) at "TENT--SPLIT-WONT-WORK.epub/OEBPS/Text/loi.xhtml" (line 39, col 43):
   Fragment identifier is not defined.

ERROR (RSC-012) at "TENT--SPLIT-WONT-WORK.epub/OEBPS/Text/loi.xhtml" (line 43, col 43):
   Fragment identifier is not defined.

ERROR (RSC-012) at "TENT--SPLIT-WONT-WORK.epub/OEBPS/Text/loi.xhtml" (line 47, col 43):
   Fragment identifier is not defined.

ERROR (RSC-012) at "TENT--SPLIT-WONT-WORK.epub/OEBPS/Text/loi.xhtml" (line 51, col 43):
   Fragment identifier is not defined.

ERROR (RSC-012) at "TENT--SPLIT-WONT-WORK.epub/OEBPS/Text/loi.xhtml" (line 55, col 43):
   Fragment identifier is not defined.

ERROR (RSC-012) at "TENT--SPLIT-WONT-WORK.epub/OEBPS/Text/loi.xhtml" (line 59, col 43):
   Fragment identifier is not defined.

ERROR (RSC-012) at "TENT--SPLIT-WONT-WORK.epub/OEBPS/Text/loi.xhtml" (line 63, col 43):
   Fragment identifier is not defined.

ERROR (RSC-012) at "TENT--SPLIT-WONT-WORK.epub/OEBPS/Text/loi.xhtml" (line 67, col 43):
   Fragment identifier is not defined.

ERROR (RSC-012) at "TENT--SPLIT-WONT-WORK.epub/OEBPS/Text/loi.xhtml" (line 71, col 43):
   Fragment identifier is not defined.

ERROR (RSC-012) at "TENT--SPLIT-WONT-WORK.epub/OEBPS/Text/loi.xhtml" (line 75, col 43):
   Fragment identifier is not defined.

ERROR (RSC-012) at "TENT--SPLIT-WONT-WORK.epub/OEBPS/Text/loi.xhtml" (line 79, col 43):
   Fragment identifier is not defined.

ERROR (RSC-012) at "TENT--SPLIT-WONT-WORK.epub/OEBPS/Text/loi.xhtml" (line 83, col 43):
   Fragment identifier is not defined.

ERROR (RSC-012) at "TENT--SPLIT-WONT-WORK.epub/OEBPS/Text/loi.xhtml" (line 87, col 43):
   Fragment identifier is not defined.

ERROR (RSC-012) at "TENT--SPLIT-WONT-WORK.epub/OEBPS/Text/loi.xhtml" (line 91, col 43):
   Fragment identifier is not defined.

ERROR (RSC-007) at "TENT--SPLIT-WONT-WORK.epub/OEBPS/Text/titlepage.xhtml" (line 29, col 79):
   Referenced resource could not be found in the EPUB.

ERROR (RSC-007) at "TENT--SPLIT-WONT-WORK.epub/OEBPS/Text/TENT.xhtml" (line 79, col 61):
   Referenced resource could not be found in the EPUB.

ERROR (RSC-007) at "TENT--SPLIT-WONT-WORK.epub/OEBPS/Text/TENT.xhtml" (line 164, col 61):
   Referenced resource could not be found in the EPUB.

ERROR (RSC-007) at "TENT--SPLIT-WONT-WORK.epub/OEBPS/Text/TENT.xhtml" (line 239, col 61):
   Referenced resource could not be found in the EPUB.

ERROR (RSC-007) at "TENT--SPLIT-WONT-WORK.epub/OEBPS/Text/TENT.xhtml" (line 411, col 61):
   Referenced resource could not be found in the EPUB.

ERROR (RSC-007) at "TENT--SPLIT-WONT-WORK.epub/OEBPS/Text/TENT.xhtml" (line 421, col 61):
   Referenced resource could not be found in the EPUB.

ERROR (RSC-007) at "TENT--SPLIT-WONT-WORK.epub/OEBPS/Text/TENT.xhtml" (line 435, col 61):
   Referenced resource could not be found in the EPUB.

ERROR (RSC-007) at "TENT--SPLIT-WONT-WORK.epub/OEBPS/Text/TENT.xhtml" (line 566, col 61):
   Referenced resource could not be found in the EPUB.

ERROR (RSC-007) at "TENT--SPLIT-WONT-WORK.epub/OEBPS/Text/TENT.xhtml" (line 626, col 61):
   Referenced resource could not be found in the EPUB.

ERROR (RSC-007) at "TENT--SPLIT-WONT-WORK.epub/OEBPS/Text/TENT.xhtml" (line 723, col 61):
   Referenced resource could not be found in the EPUB.

ERROR (RSC-007) at "TENT--SPLIT-WONT-WORK.epub/OEBPS/Text/TENT.xhtml" (line 829, col 61):
   Referenced resource could not be found in the EPUB.

ERROR (RSC-007) at "TENT--SPLIT-WONT-WORK.epub/OEBPS/Text/TENT.xhtml" (line 839, col 61):
   Referenced resource could not be found in the EPUB.

ERROR (RSC-007) at "TENT--SPLIT-WONT-WORK.epub/OEBPS/Text/TENT.xhtml" (line 914, col 61):
   Referenced resource could not be found in the EPUB.

ERROR (RSC-007) at "TENT--SPLIT-WONT-WORK.epub/OEBPS/Text/TENT.xhtml" (line 963, col 61):
   Referenced resource could not be found in the EPUB.

ERROR (RSC-007) at "TENT--SPLIT-WONT-WORK.epub/OEBPS/Text/TENT.xhtml" (line 1220, col 61):
   Referenced resource could not be found in the EPUB.

ERROR (RSC-007) at "TENT--SPLIT-WONT-WORK.epub/OEBPS/Text/TENT.xhtml" (line 1284, col 61):
   Referenced resource could not be found in the EPUB.

ERROR (RSC-007) at "TENT--SPLIT-WONT-WORK.epub/OEBPS/Text/TENT.xhtml" (line 1361, col 61):
   Referenced resource could not be found in the EPUB.

ERROR (RSC-007) at "TENT--SPLIT-WONT-WORK.epub/OEBPS/Text/TENT.xhtml" (line 1463, col 61):
   Referenced resource could not be found in the EPUB.

ERROR (RSC-007) at "TENT--SPLIT-WONT-WORK.epub/OEBPS/Text/TENT.xhtml" (line 1540, col 61):
   Referenced resource could not be found in the EPUB.

ERROR (RSC-007) at "TENT--SPLIT-WONT-WORK.epub/OEBPS/Text/TENT.xhtml" (line 1643, col 61):
   Referenced resource could not be found in the EPUB.


---------------------------------------------------

Check finished with 40 errors!


Did you by any chance remove them before attaching it to your post?
Doitsu is offline   Reply With Quote
Old 06-23-2016, 06:33 AM   #3
GrannyGrump
Obsessively Dedicated...
GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.
 
GrannyGrump's Avatar
 
Posts: 3,221
Karma: 35037583
Join Date: May 2011
Location: PA {back in the usa!}
Device: Sony PRS-T2, ADE on PC
I will be double-dipped in dragon spit. All my image id's are missing.

Let me patch those right quick, and I bet that is the problem.

Thank you, oh mighty eagle-eyes!
GrannyGrump is offline   Reply With Quote
Old 06-23-2016, 06:55 AM   #4
GrannyGrump
Obsessively Dedicated...
GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.
 
GrannyGrump's Avatar
 
Posts: 3,221
Karma: 35037583
Join Date: May 2011
Location: PA {back in the usa!}
Device: Sony PRS-T2, ADE on PC
That was absolutely it, and bless you for helping me.
(You may snicker quietly to yourself if you like, I certainly deserve it!)

Gold stars and chocolate-chip cookies for you!
GrannyGrump is offline   Reply With Quote
Old 06-23-2016, 06:58 AM   #5
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,727
Karma: 24031401
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by GrannyGrump View Post
That was absolutely it, and bless you for helping me.
That was the least I could do, given the many great high-quality books that you've uploaded.
Doitsu is offline   Reply With Quote
Old 06-23-2016, 07:09 AM   #6
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 28,570
Karma: 204127028
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Interesting. So if the target fragment/id is not found, the file name portion of the href disappears upon splitting. Have to see if something could be done about that. Wouldn't think that would be desirable.

Thanks for the examples (and for your eyes, Doitsu)! I'd seen this effect crop up from time to time, but never really figured out under exactly which circumstances it happened.

Good to know it can be avoided by validating (EpubCheck) before splitting, but it really shouldn't be happening, in my opinion, regardless. That's a fairly destructive side-effect.

Last edited by DiapDealer; 06-23-2016 at 07:37 AM.
DiapDealer is online now   Reply With Quote
Old 06-23-2016, 07:19 AM   #7
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,727
Karma: 24031401
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by DiapDealer View Post
Interesting. So if the target fragment/id is not found, the file name portion of the href disappears upon splitting. Have to see if something could be done about that. Wouldn't think that would be desirable.
Since the built-in Sigil Reports tool (Tools > Reports > Links), can detect broken links, maybe you could recycle the Reports tool link check code to run a quick link check before splitting chapters?
Doitsu is offline   Reply With Quote
Old 06-23-2016, 07:34 AM   #8
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 28,570
Karma: 204127028
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
That's certainly a possibility, but I'm hoping we can do better than checking first and then aborting a split if the situation is found. We should (he said tentatively--not having examined the code in question ) be able to handle this in the Link Update routines. So that the new file name is included in the href whether the target fragment/id is present or not. At least I hope so, anyway.

It's worth pointing out that Flightcrew doesn't report the "Fragment identifier not defined" error like EpubCheck does. Probably a big part of the reason this issue has escaped being nailed down for so long. And it's been around a looooong time.

Last edited by DiapDealer; 06-23-2016 at 07:38 AM.
DiapDealer is online now   Reply With Quote
Old 06-23-2016, 08:16 AM   #9
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,727
Karma: 24031401
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by DiapDealer View Post
We should (he said tentatively--not having examined the code in question ) be able to handle this in the Link Update routines. So that the new file name is included in the href whether the target fragment/id is present or not.
That would certainly be the most elegant solution, however, it'd also nice if Sigil told the user that the book contains missing/wrong fragment ids.
The user could then either cancel splitting and fix all fragment id issues or go ahead with the splitting knowing full well that s/he will have to eventually fix them.
Doitsu is offline   Reply With Quote
Old 06-23-2016, 08:30 AM   #10
doubleshuffle
Unicycle Daredevil
doubleshuffle ought to be getting tired of karma fortunes by now.doubleshuffle ought to be getting tired of karma fortunes by now.doubleshuffle ought to be getting tired of karma fortunes by now.doubleshuffle ought to be getting tired of karma fortunes by now.doubleshuffle ought to be getting tired of karma fortunes by now.doubleshuffle ought to be getting tired of karma fortunes by now.doubleshuffle ought to be getting tired of karma fortunes by now.doubleshuffle ought to be getting tired of karma fortunes by now.doubleshuffle ought to be getting tired of karma fortunes by now.doubleshuffle ought to be getting tired of karma fortunes by now.doubleshuffle ought to be getting tired of karma fortunes by now.
 
doubleshuffle's Avatar
 
Posts: 13,944
Karma: 185432100
Join Date: Jan 2011
Location: Planet of the Pudding Brains
Device: Aura HD (R.I.P. After six years the USB socket died.) tolino shine 3
Quote:
Originally Posted by GrannyGrump View Post
I will be double-dipped in dragon spit.
Don't worry. I won't...
doubleshuffle is offline   Reply With Quote
Old 06-23-2016, 09:12 AM   #11
pynch
why in?
pynch ought to be getting tired of karma fortunes by now.pynch ought to be getting tired of karma fortunes by now.pynch ought to be getting tired of karma fortunes by now.pynch ought to be getting tired of karma fortunes by now.pynch ought to be getting tired of karma fortunes by now.pynch ought to be getting tired of karma fortunes by now.pynch ought to be getting tired of karma fortunes by now.pynch ought to be getting tired of karma fortunes by now.pynch ought to be getting tired of karma fortunes by now.pynch ought to be getting tired of karma fortunes by now.pynch ought to be getting tired of karma fortunes by now.
 
pynch's Avatar
 
Posts: 1,630
Karma: 29896776
Join Date: Apr 2012
Device: Sony PRS-350, Kobo Aura
Quote:
Originally Posted by DiapDealer View Post
So that the new file name is included in the href whether the target fragment/id is present or not. At least I hope so, anyway.
Sounds impossible to me. If the id isn’t present, there’s no way of determining for the software in which of the split files the id is supposed to be (as long as the software can’t look into the e-book producer’s brain, which, ahem, it shouldn’t).
pynch is offline   Reply With Quote
Old 06-23-2016, 09:26 AM   #12
GrannyGrump
Obsessively Dedicated...
GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.
 
GrannyGrump's Avatar
 
Posts: 3,221
Karma: 35037583
Join Date: May 2011
Location: PA {back in the usa!}
Device: Sony PRS-T2, ADE on PC
I'm just happy to know I need to run epubcheck BEFORE I split. Always previously, that was almost the last thing I did. I need to get the habit of running it periodically during the entire editing process.

And I love my desktop Pagina Epubcheck, it's just so cute and cuddly!
GrannyGrump is offline   Reply With Quote
Old 06-23-2016, 09:32 AM   #13
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,764
Karma: 6000000
Join Date: Nov 2009
Device: many
And pynch is correct here.

The routine in question is SourceUpdates/AnchorUpdates.cpp in the routine:

void AnchorUpdates::UpdateAllAnchorsWithIDs(const QList<HTMLResource *> &html_resources)

The only way to determine in which of the newly split files an anchor ends up is for the achor to have actually existed previously!

There is simply no way to tell if a non-existent id was before the split or after the split or almost anyplace if multiple splits are done.

The update anchor routine builds a list of all actual ids locations and uses that to determine which of the newly split files that link should be changed to.

So there is no way to really fix it, we can in fact detect if a link fragment is not an actual ID and then ignore changing that link at all but that is still a very broken link that does nothing. It is the location of the id itself which determines which file it should be changed to.

Unfortunately, this routine is invoked only *after* the physical split (and the assigning of filenames)and so we simply can not abort it without lots of broken links.

Perhaps a better solution would be to replace the file portion for non-existing fragment ids with a placeholder, something along the lines of:


UNKNOWN_LINK_BECAUSE_FRAGMENT_ID_DOES_NOT_EXIST

or some other ridiculously long string that could easily be searched for to make things more obvious that there is no way to update a link that has a fragment id if that fragment id does not exist when splitting the file.

KevinH
KevinH is offline   Reply With Quote
Old 06-23-2016, 09:59 AM   #14
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 28,570
Karma: 204127028
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Shows what I know.

What about a nag screen before splitting asking if the user wants to run a broken link check first?

Last edited by DiapDealer; 06-23-2016 at 10:07 AM.
DiapDealer is online now   Reply With Quote
Old 06-23-2016, 10:23 AM   #15
pynch
why in?
pynch ought to be getting tired of karma fortunes by now.pynch ought to be getting tired of karma fortunes by now.pynch ought to be getting tired of karma fortunes by now.pynch ought to be getting tired of karma fortunes by now.pynch ought to be getting tired of karma fortunes by now.pynch ought to be getting tired of karma fortunes by now.pynch ought to be getting tired of karma fortunes by now.pynch ought to be getting tired of karma fortunes by now.pynch ought to be getting tired of karma fortunes by now.pynch ought to be getting tired of karma fortunes by now.pynch ought to be getting tired of karma fortunes by now.
 
pynch's Avatar
 
Posts: 1,630
Karma: 29896776
Join Date: Apr 2012
Device: Sony PRS-350, Kobo Aura
I don’t really see a problem with how the software currently works. It doesn’t actually break the links, as they were broken before.

And the way it currently works makes it easy—at least for people who always use full links with the file name and the id—to spot broken links when they search for /# .
pynch is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Creating links in an existing epub-text? Chris_ Editor 3 07-06-2015 06:10 PM
When you split a file does Sigil update links? JimmyG Sigil 2 10-31-2013 01:02 PM
How to create TOC, what does split on SGF markers mean? neonbible Sigil 18 01-23-2011 06:22 AM
Existing links forum removed Alexander Turcic Announcements 0 11-17-2002 04:06 PM
Existing links now updated Alexander Turcic Announcements 0 10-27-2002 08:55 AM


All times are GMT -4. The time now is 06:04 AM.


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