# Please fix internal links in class documentation

**URL:** <https://root-forum.cern.ch/t/please-fix-internal-links-in-class-documentation/29107>\
**Category:** Site Feedback\
**Tags:** documentation\
**Created:** [May 23, 2018, 12:24pm UTC](https://root-forum.cern.ch/t/please-fix-internal-links-in-class-documentation/29107 "2018-05-23T12:24:28Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![Wile\_E\_Coyote](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/wile_e_coyote/32/12417_2.png) [@Wile\_E\_Coyote](https://root-forum.cern.ch/u/Wile_E_Coyote)\
**Post date:** [May 23, 2018, 12:24pm UTC](https://root-forum.cern.ch/t/please-fix-internal-links-in-class-documentation/29107/1 "2018-05-23T12:24:28Z")

</div>

In the “old” ROOT documentation, internal web links to class members were preserved across releases.  
So, (almost always) any link given to some method was valid even years after the post was written.  
An example:  
[TGraph::Integral from ROOT 5.34](https://root.cern.ch/root/html534/TGraph.html#TGraph:Integral)  
[TGraph::Integral from ROOT 5.30](https://root.cern.ch/root/html530/TGraph.html#TGraph:Integral)

Unfortunately, the “new” way of the documentation generator creates new distinct links (almost?) each time it is executed.  
As a result, links in forum posts become quickly invalid.  
An example:  
[TGraph::Integral from ROOT master as of 2018.05.23](https://root.cern/doc/master/classTGraph.html#a06b6dfc69d4fe9336ade71a47864f974)  
[TGraph::Integral from ROOT master as of 2017.05.05](https://root.cern/doc/master/classTGraph.html#a635997a6d81e4e89529aaf1819cf7533)

Please, fix this problem.  
Posts in this forum are very often “reused” (and read by people even years after they were created) and the links given inside should be kept “valid”.

---

<div class="post-metadata">

**Author:** ![ksmith](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/ksmith/32/12567_2.png) [@ksmith](https://root-forum.cern.ch/u/ksmith)\
**Post date:** [May 23, 2018, 12:31pm UTC](https://root-forum.cern.ch/t/please-fix-internal-links-in-class-documentation/29107/2 "2018-05-23T12:31:00Z")

</div>

Part of the problem here is that the links point to the master documentation and the links there get “randomly” assigned by doxygen every time the documentation is compiled. If instead links to particular versions were posted then the links would hopefully not be regenerated as that version has been finalized and released. Somehow the master version needs to be harder to find and instead the latest recommended version should be the go to for documentation, this also avoids issues where new features are added to the master documentation which users expect to be in the recommended release.

---

<div class="post-metadata">

**Author:** ![Wile\_E\_Coyote](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/wile_e_coyote/32/12417_2.png) [@Wile\_E\_Coyote](https://root-forum.cern.ch/u/Wile_E_Coyote)\
**Post date:** [May 23, 2018, 12:35pm UTC](https://root-forum.cern.ch/t/please-fix-internal-links-in-class-documentation/29107/3 "2018-05-23T12:35:45Z")

</div>

Note that in the “old” ROOT 5 documentation, all links were preserved in the ROOT 5 master, too (the only change in links was “/html/” for the master versus “/html534/” for 5.34 versus “/html530/” for 5.30).

We need this same approach now.

Olivier strongly encourages people to give links (in posts) to the current master, but this quickly creates broken posts.

So, we need a way to convince doxygen to generate “stable” / “predictable” links (instead of “random” strings).

---

<div class="post-metadata">

**Author:** ![couet](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/couet/32/12037_2.png) [@couet](https://root-forum.cern.ch/u/couet)\
**Post date:** [May 23, 2018, 1:10pm UTC](https://root-forum.cern.ch/t/please-fix-internal-links-in-class-documentation/29107/4 "2018-05-23T13:10:59Z")

</div>

Seems to me only the links to the methods are not preserved, Right ? For instance the link to the TGraph class is always `root.cern/doc/master/classTGraph.html`. I agree with you that it is really annoying to have the links to the methods changing. I will check if some solution exists .

---

<div class="post-metadata">

**Author:** ![couet](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/couet/32/12037_2.png) [@couet](https://root-forum.cern.ch/u/couet)\
**Post date:** [May 23, 2018, 1:59pm UTC](https://root-forum.cern.ch/t/please-fix-internal-links-in-class-documentation/29107/5 "2018-05-23T13:59:06Z")

</div>

> [@ksmith](#):
>
> If instead links to particular versions were posted then the links would hopefully not be regenerated as that version has been finalized and released.

We also regenerate (every night) older versions of the documentation, for instance to fix mistakes or typos. So even the “non master” version are changing.

---

<div class="post-metadata">

**Author:** ![couet](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/couet/32/12037_2.png) [@couet](https://root-forum.cern.ch/u/couet)\
**Post date:** [May 23, 2018, 2:24pm UTC](https://root-forum.cern.ch/t/please-fix-internal-links-in-class-documentation/29107/6 "2018-05-23T14:24:53Z")

</div>

I investigated a bit more and found some information here and there. According to what I saw, the naming of the “funstions’ URL” is done according to the functions’ prototypes, Therefore if the function signature does not change it should be the same among various documentation (re)generation. And indeed it seems to be the case. I just take here as example a function I know for sure it has not changed between 6.10 and the current master: `TGaxis::ChangeLabel` . Here are the URL for 6.10 and master:

```auto
 https://root.cern/doc/master/classTGaxis.html#a8ef5ba035d846add3902cd714336eaac
https://root.cern.ch/doc/v610/classTGaxis.html#a8ef5ba035d846add3902cd714336eaac

```

As you can see they are exactly the same.

And even if I generate a short version of the doc locally on my machine I get the same URL:

```auto
file:///Users/couet/rootdoc/html/classTGaxis.html#a8ef5ba035d846add3902cd714336eaac

```

---

<div class="post-metadata">

**Author:** ![Wile\_E\_Coyote](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/wile_e_coyote/32/12417_2.png) [@Wile\_E\_Coyote](https://root-forum.cern.ch/u/Wile_E_Coyote)\
**Post date:** [May 23, 2018, 2:35pm UTC](https://root-forum.cern.ch/t/please-fix-internal-links-in-class-documentation/29107/7 "2018-05-23T14:35:38Z")

</div>

Well, maybe they depend on the doxygen version:  
[https://root.cern.ch/doc/v606/classTGraph.html#a635997a6d81e4e89529aaf1819cf7533](https://root.cern.ch/doc/v606/classTGraph.html#a635997a6d81e4e89529aaf1819cf7533)  
[https://root.cern.ch/doc/master/classTGraph.html#a06b6dfc69d4fe9336ade71a47864f974](https://root.cern.ch/doc/master/classTGraph.html#a06b6dfc69d4fe9336ade71a47864f974)  
So, as soon as you “upgrade” doxygen, all links will again be invalidated.

---

<div class="post-metadata">

**Author:** ![couet](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/couet/32/12037_2.png) [@couet](https://root-forum.cern.ch/u/couet)\
**Post date:** [May 23, 2018, 2:37pm UTC](https://root-forum.cern.ch/t/please-fix-internal-links-in-class-documentation/29107/8 "2018-05-23T14:37:13Z")

</div>

> [@Wile\_E\_Coyote](#):
>
> Well, maybe they depend on the doxygen version:

Ah … yes this can be … I will ask on the doxygen forum.

---

<div class="post-metadata">

**Author:** ![Wile\_E\_Coyote](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/wile_e_coyote/32/12417_2.png) [@Wile\_E\_Coyote](https://root-forum.cern.ch/u/Wile_E_Coyote)\
**Post date:** [May 23, 2018, 2:39pm UTC](https://root-forum.cern.ch/t/please-fix-internal-links-in-class-documentation/29107/9 "2018-05-23T14:39:56Z")

</div>

Maybe you could ask them if instead of these random “#a8ef5...” strings we could again get “#TGraph:Integral” or something like this.

---

<div class="post-metadata">

**Author:** ![couet](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/couet/32/12037_2.png) [@couet](https://root-forum.cern.ch/u/couet)\
**Post date:** [May 23, 2018, 2:46pm UTC](https://root-forum.cern.ch/t/please-fix-internal-links-in-class-documentation/29107/10 "2018-05-23T14:46:09Z")

</div>

Done… waiting the answer.

---

<div class="post-metadata">

**Author:** ![couet](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/couet/32/12037_2.png) [@couet](https://root-forum.cern.ch/u/couet)\
**Post date:** [May 23, 2018, 3:07pm UTC](https://root-forum.cern.ch/t/please-fix-internal-links-in-class-documentation/29107/11 "2018-05-23T15:07:00Z")

</div>

> [@Wile\_E\_Coyote](#):
>
> So, as soon as you “upgrade” doxygen, all links will again be invalidated.

It does not seems to be that simple. I took an other example of a very old method which for sure has not changed.`THistPainter::PaintArrows` . I looked at the oldest version of the reference guide we have generated with doxygen: 6.06 … versus the master version. I get:

```auto
https://root.cern.ch/root/html606/classTHistPainter.html#a8d22919405e4f641344c5d61cc83ba0a
     https://root.cern/doc/master/classTHistPainter.html#a8d22919405e4f641344c5d61cc83ba0a

```

… the same URL …

the doxygen versions are 1.8.9 and 1.8.13 …

So may be there is some other hidden rules triggering the name change … I leave my question on the doxygen forum. They may tell me if there is something hidden we have not seen.

---

<div class="post-metadata">

**Author:** ![Wile\_E\_Coyote](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/wile_e_coyote/32/12417_2.png) [@Wile\_E\_Coyote](https://root-forum.cern.ch/u/Wile_E_Coyote)\
**Post date:** [May 23, 2018, 8:17pm UTC](https://root-forum.cern.ch/t/please-fix-internal-links-in-class-documentation/29107/12 "2018-05-23T20:17:56Z")

</div>

Looking at the links in your last post, I noticed that you used “/root/html606/” while I used “/doc/v606/”.

It seems that, for “TGraph::Integral”, they produce different links starting with ROOT 6.08:  
[https://root.cern.ch/doc/v608/classTGraph.html#a06b6dfc69d4fe9336ade71a47864f974](https://root.cern.ch/doc/v608/classTGraph.html#a06b6dfc69d4fe9336ade71a47864f974)  
[https://root.cern.ch/root/html608/classTGraph.html#a635997a6d81e4e89529aaf1819cf7533](https://root.cern.ch/root/html608/classTGraph.html#a635997a6d81e4e89529aaf1819cf7533)

Note: starting from ROOT 6.10, “/doc/v610/” exists and “/root/html610/” does NOT.

---

<div class="post-metadata">

**Author:** ![Wile\_E\_Coyote](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/wile_e_coyote/32/12417_2.png) [@Wile\_E\_Coyote](https://root-forum.cern.ch/u/Wile_E_Coyote)\
**Post date:** [May 24, 2018, 10:08am UTC](https://root-forum.cern.ch/t/please-fix-internal-links-in-class-documentation/29107/13 "2018-05-24T10:08:23Z")

</div>

Just an idea … can one somehow convince doxygen to emulate c++ compiler’s name mangling (“man c++filt”)?

---

<div class="post-metadata">

**Author:** ![system](https://root-forum.cern.ch/uploads/default/original/3X/e/f/efe4f24398fd8ffeb76bccb6ecc46d9d9c003376.png) [@system](https://root-forum.cern.ch/u/system)\
**Post date:** [June 7, 2018, 10:08am UTC](https://root-forum.cern.ch/t/please-fix-internal-links-in-class-documentation/29107/14 "2018-06-07T10:08:23Z")

</div>

Closed on June 7, 2018, 10:08am UTC

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
