Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Same-page internal links to not work in webbbook when collapsed headings enabled #1173

Open
4 tasks done
josieg opened this issue Jul 13, 2023 · 0 comments
Open
4 tasks done
Assignees
Labels
bug Something isn't working needs-reproduction

Comments

@josieg
Copy link

josieg commented Jul 13, 2023

Prerequisites

Description

When same-page internal links are used in a webook that has "collapsed headings" enabled, the internal link will not work if the destination anchor is within a collapsed heading. When you click the link, nothing happens. However, once the #anchorid is added to the address bar, you can reload the page and be taken to the anchor.

Internal links to anchors between different chapters are working as expected. This only seems to affect same-page links, including the return link for footnotes.

It is possibly related to these closed issues: #279 and #251.

Steps to Reproduce

  1. Create a chapter with two Heading 1s.
  2. Under the second heading, insert an anchor with a unique ID.
  3. Under the first heading, create a link to that anchor.
  4. Enable "Collapse headings" in web theme options.
  5. View the chapter in the webbook.
  6. Expand the 1st heading and click the link. Nothing happens.

Expected behavior: When I click the link, I would expect the heading 1 that contains the anchor to expand and for me to be taken directly to that anchor.

Actual behavior: When I click the link, nothing happens.

System Information

System Information

Book Info

Book ID: 272
Book URL: https://kpu.pressbooks.pub/josiestestbook/
Book Privacy: Public

Browser

Platform: Windows
Browser Name: Firefox
Browser Version: 115.0
User Agent String: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/115.0

WordPress Configuration

Network URL: https://kpu.pressbooks.pub/
Network Type: Subdirectory
Version: 6.2.2
Language: en_US
WP_ENV: client-ca-central-1
WP_DEBUG: Disabled
Memory Limit: 96M

Pressbooks Configuration

Version: 6.13.0
Book Theme: McLuhan
Book Theme Version: 2.26.0
Root Theme: Aldine
Root Theme Version: 1.19.0

Pressbooks Dependencies

Epubcheck: Installed
xmllint: Installed
PrinceXML: Not Installed
Saxon-HE: Installed

Must-Use Plugins

Bedrock Autoloader: 1.0.3
hm-autoloader.php: n/a
Register Theme Directory: 1.0.0
telemetry.php: n/a
WordPress Sentry: must-use-proxy

Network Active Plugins

Enable Media Replace: 4.1.2
Hypothesis: 0.6.0
Koko Analytics: 1.0.38
Lord of the Files: Enhanced Upload Security: 1.3.16
Object Cache Pro: 1.18.2
Pressbooks: 6.13.0
Pressbooks BISAC: 2.6.0
Pressbooks Network Analytics: 2.6.0
Pressbooks Network Catalog: 1.3.2
Pressbooks Plugins Config: 1.8.0
Pressbooks Results for LMS: 2.3.5
Pressbooks SAML2 Single Sign-On: 2.4.0
Pressbooks Stats: 1.9.0
Pressbooks Whitelabel: 1.8.0
User Activation Keys: 4.6
WordPress Sentry: 6.20.0
WP Fail2Ban Redux: 0.8.2

Book Active Plugins

Enable Media Replace: 4.1.2
Hypothesis: 0.6.0
Koko Analytics: 1.0.38
Lord of the Files: Enhanced Upload Security: 1.3.16
Object Cache Pro: 1.18.2
Pressbooks: 6.13.0
Pressbooks BISAC: 2.6.0
Pressbooks Network Analytics: 2.6.0
Pressbooks Network Catalog: 1.3.2
Pressbooks Plugins Config: 1.8.0
Pressbooks Results for LMS: 2.3.5
Pressbooks SAML2 Single Sign-On: 2.4.0
Pressbooks Stats: 1.9.0
Pressbooks Whitelabel: 1.8.0
User Activation Keys: 4.6
WordPress Sentry: 6.20.0
WP Fail2Ban Redux: 0.8.2

Inactive Plugins

Akismet Anti-Spam: Spam Protection: 5.2
Candela Citation: 0.2.4
Excalibur: 0.7.0
H5P: 1.15.6
Parsedown Party: 1.2.1
Pressbooks CAS Single Sign-On: 2.3.0
Pressbooks eCampus Ontario: 1.5.0
Pressbooks OIDC Single Sign-On: 2.3.0
Pressbooks Shortcode Handler: 1.0.1
Redirection: 5.3.10
Regenerate Thumbnails: 3.1.5
TablePress: 1.14
TablePress Extension: DataTables Buttons: 1.5
WP QuickLaTeX: 3.8.6

Server Configuration

PHP Version: 8.1.20
MySQL Version: 10.5.17
Webserver Info: nginx/1.18.0

PHP Configuration

Memory Limit: 256M
Upload Max Size: 25M
Post Max Size: 25M
Upload Max Filesize: 25M
Time Limit: 240
Max Input Vars: 1000
URL-aware fopen: On (1)
Display Errors: N/A

PHP Extensions

OPcache: Zend
XDebug: Disabled
cURL: Supported
cURL Version: 7.68.0
imagick: Not Installed
xsl: Installed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs-reproduction
Projects
None yet
Development

No branches or pull requests

3 participants