Page MenuHomePhorge

All @{method:...} links in Diviner docs result in a "Documentation Not Found" error
Open, Needs TriagePublic

Description

Steps to reproduce:

Expected result:
Documentation.

Actual result:

Documentation Not Found
Unable to find the specified documentation. You may have followed a bad or outdated link.

Note that this is not a 404 error like in T16044.

Event Timeline

A quick fix would be removing the single line $query->withIsDocumentable(true); in https://we.phorge.it/source/phorge/browse/master/src/applications/diviner/controller/DivinerFindController.php;85f51c54303fe50ebc09ee0b652033a8a9f29ab1$45
as that'll allow results for Methods.

It's unclear to me what that isDocumentable boolean is good for anyway. Seems to be a duplication of types:

MariaDB [phabricator_diviner]> SELECT COUNT(type), type, isDocumentable FROM diviner_livesymbol GROUP BY type, isDocumentable;
+-------------+-----------+----------------+
| COUNT(type) | type      | isDocumentable |
+-------------+-----------+----------------+
|         158 | article   |              1 |
|        5868 | class     |              1 |
|        6084 | file      |              0 |
|          33 | function  |              1 |
|          47 | interface |              1 |
|       38246 | method    |              0 |
+-------------+-----------+----------------+
6 rows in set (0.047 sec)

After removing that single line you'd run into T16044: Diviner: All Method and File query results have invalid 404 URIs (getting a 404 error instead of Documentation Not Found).