Table of Contents
Compatible with DokuWiki
- 2023-04-04 "Jack Jackrum" yes
- 2022-07-31 "Igor" unknown
- 2020-07-29 "Hogfather" unknown
- 2018-04-22 "Greebo" unknown
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.
- Remove noreply e-mail address 2 (2023-05-30 19:58)
- Remove noreply e-mail address (2023-05-30 19:58)
- 2023-05-30 (2023-05-30 19:55)
- Fix unknown array key errors; Add alexdraconian as an author (2023-05-30 19:54)
- Update README.md (2023-05-30 19:52)
- Don't import syntax.php, it's autoloaded (2023-05-30 19:50)
- Merge pull request #44 from alexdraconian/master (2023-05-30 19:29)
- Delete mis-inserted line (2022-01-22 15:37)
- 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, log in 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 page name 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.
Only tested on Jack Jackrum but should work on Igor. — jaller 2023-05-30 19:37
Tried to make it work on Hogfather and everything looks OK. — Fiisch 2023-11-03 15:15
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).