GNOME Bugzilla – Bug 544311
html links to anchors on current page do not work
Last modified: 2010-05-10 21:34:45 UTC
[ Forwarded from http://bugs.debian.org/487762 by Tim Retout ] In yelp, when clicking on an html link to an anchor on the current page, e.g.: <a name="toc_Preface" href="#Preface">1 About the GNU Coding Standards</a> I get a dialog box saying: Page not found The page Preface was not found in the TOC The same page behaves as expected in Epiphany. You can also reproduce this with most Debian manuals with the 'Contents' link at the top. (On the first page only, of course. Links to index.html#contents on the other pages work fine, and jump to the right section.) [ Additional comments from myself ] This does not happen with the GNOME XML manuals, only with plain HTML manuals (we generate scrollkeeper files for them so that they appear in yelp).
I wrote up a summary of the inconsistent URL fragment handling in bug #512827 (Yelp WebKit port). The proposed changes to Yelp and Yelp's docbook XSL stylesheets might help resolve this issue too.
Another workaround: when you click the in-page-anchor it reports "not found", but you can click "back" and "forward" button, which leads you to the correct place without problem. Perhaps it has something to do with line 264 in src/yelp-toc.c, where TOC_STATE_PARSED handled the same as TOC_STATE_STOP, where the latter indicates failure, but the former shouldn't.
Thanks for the bug report. This is now working correctly in the development version in git master.