Internal links to chapters do not correctly export to EPUB, MOBI and EPUB 3


#1

Hi There,

In our book, we have a few links from one chapter to another, and these do not correctly export to EPUB, MOBI and EPUB 3. A MWE is the following:

<a href="https://wisc.pb.unizin.org/agent-based-evolutionary-games/chapter/1-0/">the next chapter</a>

gets translated in EPUB, MOBI and EPUB 3 files into:

<a href="chapter-005-1-0.html">the next chapter</a>

but the name of the html file in the EPUB, MOBI and EPUB 3 file is:

chapter-005-slug-1-0.html

so the internal link does not work.

This occurs even if you define the original link in relative terms, i.e. as:

<a href="/agent-based-evolutionary-games/chapter/1-0/">the next chapter</a>

Has any other person encountered this error?

Thanks a lot,
Luis


#2

Thanks for this clear and comprehensive bug report. If you have a chance, could you open a GitHub ticket with the same details? Thanks! https://github.com/pressbooks/pressbooks/issues/new


#3

Done!

Thanks a lot for confirming that this is indeed an issue worth raising in GitHub,
Cheers,
Luis


#4

I will ask Pressbooks Support to comment on this. Internal links should work, it’s possible this is unclear documentation / user “error”.


#5

Nope, it was a bug. @lrizquierdo @dac.chartrand fixed it in https://github.com/pressbooks/pressbooks/pull/1027, which will be released in Pressbooks 5.0 at the end of January. Thanks for reporting!


#6

Thank YOU @ned and @dac.chartrand !!