Table of Contents
Compatible with DokuWiki
- 2020-07-29 "Hogfather" yes
- 2018-04-22 "Greebo" yes
- 2017-02-19 "Frusterick Manners" yes
- 2016-06-26 "Elenor Of Tsort" yes
Originally by Doug Edmunds.
Use this plugin to find orphan pages and wanted pages.
OrphansWanted show which pages are:
- Orphans (the page exists, but it has no links to it)
- Wanted (the page does not exist, but there are link(s) to it elsewhere on the site)
- Valid (the page exists, and it can be reached through a link)
Each table shows the reference count and a link to backlinks.
Basic usage is to place one of the following four lines into the page markup:
~~ORPHANSWANTED:orphans~~ ~~ORPHANSWANTED:wanted~~ ~~ORPHANSWANTED:valid~~ ~~ORPHANSWANTED:all~~ << makes all three tables
Anything other than these 4 words will generate a syntax error message.
Enhanced usage excludes some namespaces, each prefixed with an exclamation point '!' (think 'not')
Example – exclude one namespace:
Shows wanted pages, but none that are under the
Example – exclude multiple namespaces:
Shows orphan pages, but none in the
wiki: or in the
Please check GitHub for most recent version; and please comment on the GitHub version using GitHub 'issues' mechanism. Comments and issues below apply to the code included on the page below.
- Merge pull request #36 from ThomasChr/master (2017-11-07 20:11)
- Make sure is lowercase. Fixes #35 (2017-11-07 19:58)
- Update README (2017-06-25 23:31)
- Update README (2017-06-25 23:28)
- Merge pull request #33 from lupo49/include (2017-06-25 23:26)
- Merge pull request #32 from lupo49/sorting (2017-06-25 23:23)
- Adapted the commit a1d1970 of @rikblok implementing @include. Fixes #8 (2017-06-25 23:15)
- Always sort namespaces but don't sort for links when listing orphans. (2017-06-25 21:23)
- I strongly suggest you put ~~NOCACHE~~ on the page where this plugin is used. This helps assure that ACL permissions get applied. Otherwise some other user, with lesser ACL permissions, may see a cached copy of the results.
- ACL settings are applied first, before any exclusions. Only pages you have permission to view can be listed. To be sure to see everything, login as superuser.
- Reference counts (number of links) may include pages that cannot be viewed due to ACL settings.
- It is fast enough for a site with 200+ short pages.
- If you see something that you think must have a link, check your spelling. If you typed the pagename wrong on the other page, you created a “wanted” page instead of a link to an existing page.
- Try fixing bad links one by one after you figure out what is wrong. Do this until your orphan/wanted lists are as clean as you need.
- It would be nice to be able to sort the list by their namespaces, names or titles instead of only by their backlinks → This can be achieved with plugin sortablejs with Tablesorter.
- It would be nice to have an option to limit the number of output lines or to only print wanted pages that are requested multiple times.
- Would it be a big functionality change to add the ability to list broken external links too? I haven't been able to find a plugin that does this yet.
- Especially in a closed wiki with use of ACLs it would be great if one could define the starting namespace for the search, instead of running through all namespaces. This could avoid ACL errors in the output.
- It might be useful to add an additional table for pages that have not been updated in a long time.
- It might be useful to add an additional table for pages with a very small amount of content.
Discussion and Bugs
Please raise bugs and requests for enhancements in GitHub. This page is not routinely monitored, so comments here may languish forever.
I've just installed and tested the Orphanswanted Plugin in my dokuwiki running Weatherwax. Works like a charm, no display issues between Firefox 21.0 and IE 8.0 (don't laugh at me). - Steve
I confirm that it works wonderfully in dokuwiki Detritus (just tried firefox) — arimane 2015-11-23 04:56
I've had this installed before, and didn't have this appear, but after changing permissions to get the plugin to work in a different installment, I'm noticing all of this:
- – Checking law:intro
- — link='law:intro' MISS A_LINK
- - New count for link law:intro: 25
- – Checking law:help
- — link='law:help' EXISTS A_LINK
- - New count for link law:help: 26
Is there any way to prevent this from appearing? -Kendra
Yes - turn off debugging mode. You're seeing these messages because you have the global config item 'allowdebug' checked in the config manager (in the back-end, set to 1 or some other value which PHP will evaluate as true).