Making WordPress.org

#6745 closed defect (bug) (fixed)

Documentation: Headings linked to from table of contents anchor links need unique ids

Reported by: zoonini's profile zoonini Owned by:
Milestone: Priority: normal
Component: Developer Hub Keywords:
Cc:

Description

In the newly redesigned Documentation section (including the Developer Hub), there is an "In this article" table of contents box at the top right.

The Issue

So far in my testing, none of those links seems to be working – clicking the links in the table of contents does nothing.

Example of an anchor link in the "In this article" TOC on the "Debugging in WordPress" page:

https://wordpress.org/documentation/article/debugging-in-wordpress/#debugging-plugins

The problem seems to stem from the fact that the heading tags referenced by the anchor links don't each have unique id. For example:

<h2 class="wp-block-heading">Debugging Plugins</h2>

Whereas shouldn't it be:

<h2 class="wp-block-heading" id="debugging-plugins">Debugging Plugins</h2>

Note

Please note that I chose the "Developer Hub" component from the dropdown, but the issue seems to affect multiple areas within the new Documentation area, so please feel free to adjust if there's a better, broader one (HelpHub?).

Attachments (1)

in-this-article-toc.png (107.7 KB) - added by zoonini 22 months ago.
Table of contents

Download all attachments as: .zip

Change History (4)

@zoonini
22 months ago

Table of contents

#1 @dufresnesteven
22 months ago

This should be fixed now. Thanks for the ticket.

#2 @zoonini
22 months ago

@dufresnesteven Confirmed, seems fixed. Thanks for the quick action!

#3 @dufresnesteven
22 months ago

  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.