Page MenuHomePhabricator

Verifiable links to anchors
Closed, DeclinedPublic


Author: Bernhard.Fastenrath

Verifiable links to anchors would allow a "What links here" function for anchors
and would allow to mark references to nonexistent anchors like links to
nonexistent pages. This would make setting and removing links to anchors in
pages much more convenient.


  • A move/rename section function could allow to move a section/anchor into

another page or to raise it to an independent page or sub-page, optionally
redirecting all references in other pages to the new name.

Version: unspecified
Severity: enhancement



Event Timeline

bzimport raised the priority of this task from to Lowest.Nov 21 2014, 9:39 PM
bzimport set Reference to bz9106.
bzimport added a subscriber: Unknown Object (MLST).

robchur wrote:

*** This bug has been marked as a duplicate of 8955 ***

Bernhard.Fastenrath wrote:

I don't know the database structure but assuming ever page has a primary key
sequence called p_id you would just have to


a_id int primary key,
p_id int references page (p_id),
a_name varchar (100),
a_deleted boolean

CREATE TABLE anchor_ref (

a_id int references anchor (a_id),
p_id int references page (p_id),

The changes to database structure mentioned in bug #8955 seem to be very minor.

I'm not suggesting the same (supposedly extremely fragile interface) as in bug
I'm suggesting a "What links here" function as for pages. If that interface is
bad why is it in use?

The suggested method would even allow to pick up dangling pointers to deleted
because once an anchor entry existed and had anchor_refs pointing to it it could
not be deleted,
the anchor would merely be set to "a_deleted = true".

I do think it is worth the effort. Broken references to anchors can be a
nuisance for editors.

Bernhard.Fastenrath wrote:

You wouldn't have to guess what "the same section is" (see bug #8928#c2).
An editor could rename a section and pick up the dangling pointers afterwards
or use a function to rename a section.

robchur wrote:

It has been established that the database schema changes this requires will not be made.