Opened 3 years ago

Closed 4 months ago

#28290 closed Cleanup/optimization (fixed)

Doc sections are missing target (labels) links

Reported by: Tony Narlock Owned by: Abhijeet Viswa
Component: Documentation Version: 1.11
Severity: Normal Keywords: docs labels intersphinx
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no


Experiencing this while writing an article about Django. Some sections are missing intersphinx references.

This has actually been plaguing me for a few years when trying to link up Django's excellent docs via sphinx. Probably 85% of intersphinx links to Django work perfectly, but there are some outliers.

With sphinx installed (pip install --user sphinx), this command can be used to print intersphinx reference names to stdout (for double checking).

python -m sphinx.ext.intersphinx ''

Supposedly, docutils/sphinx is supposed to automatically assign target links:

Labels that aren’t placed before a section title can still be referenced to, but you must give the link an explicit title, using this syntax: :ref:Link title <label-name>.


For reference, I also opened a possibly related Sphinx-doc ticket about that:

Here are a few cases of missing sections that need manual labels:

Using Sessions in views (git, docs)

Shell (git docs)

Change History (10)

comment:1 Changed 3 years ago by Tony Narlock

Owner: changed from nobody to Tony Narlock
Status: newassigned

Here is another one I can't get a header for.

To add, using sphinx 1.6.3, python 3.6.1, macOS sierra.

Last edited 3 years ago by Tony Narlock (previous) (diff)

comment:2 Changed 3 years ago by Tim Graham

Triage Stage: UnreviewedAccepted

comment:5 Changed 17 months ago by Carlton Gibson

Owner: Tony Narlock deleted
Status: assignednew

Hi Tony, I'm going to deassign this. It's been 20months without a patch, and as an Easy Pickings ticket it's likely to get picked up quickly if not claimed. Please do reclaim if you do in fact have a patch. Thanks for the report!

comment:6 Changed 16 months ago by Kamalesh Palanisamy

Owner: set to Kamalesh Palanisamy
Status: newassigned

comment:7 Changed 14 months ago by Kees Hink

Owner: changed from Kamalesh Palanisamy to Kees Hink

To make sure i understand the issue correctly: Anchors seem to be working fine, see as an example.

What seems to be missing is the link to the source code. There's a working example of such a [source] link in That link takes you to

I think this is also the intended behavior for the reported pages, because there's a class directive. Is that correct?

Last edited 14 months ago by Kees Hink (previous) (diff)

comment:8 Changed 9 months ago by Tapasweni Pathak

Hello folks: Can I take the ticket?

comment:9 Changed 5 months ago by Abhijeet Viswa

Has patch: set
Owner: changed from Kees Hink to Abhijeet Viswa

comment:10 Changed 4 months ago by GitHub <noreply@…>

Resolution: fixed
Status: assignedclosed

In 1a9459b:

Fixed #28290 -- Enabled Sphinx auto-label generation for title and section headers.

Note: See TracTickets for help on using tickets.
Back to Top