====== OrphansWanted Plugin ====== ---- plugin ---- description: Find Orphan pages, Wanted pages with reference counts. Also shows reference counts for linked pages (previous authors: Doug Edmunds) author : Matthias Schulte (maintainer), Christian 'Jaller' Paul (maintainer) and various community members email : dokuwiki@lupo49.de type : syntax lastupdate : 2023-05-30 compatible : Jack Jackrum depends : conflicts : similar : OrphanMedia,MultiOrphan tags : orphan, links, listing, search, maintenance downloadurl: https://github.com/lupo49/dokuwiki-plugin-orphanswanted/zipball/master sourcerepo : https://github.com/lupo49/dokuwiki-plugin-orphanswanted/ bugtracker : https://github.com/lupo49/dokuwiki-plugin-orphanswanted/issues donationurl: ---- Originally by [[dougedmunds@gmail.com|Doug Edmunds]]. ===== Description ===== 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. ===== Usage ===== **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') ~~ORPHANSWANTED:orphans|wanted|valid|all[!namespace!another!one:with:subspaces]~~ Example -- exclude one namespace:\\ Shows wanted pages, but none that are under the ''wiki:'' namespace ~~ORPHANSWANTED:wanted!wiki~~ Example -- exclude multiple namespaces:\\ Shows orphan pages, but none in the ''wiki:'' or in the ''sys:personal:'' namespaces ~~ORPHANSWANTED:orphans!wiki!sys:personal~~ ===== Version/Requirements ===== :!: Please check [[https://github.com/lupo49/dokuwiki-plugin-orphanswanted|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. ===== Changes ===== {{rss>https://github.com/lupo49/dokuwiki-plugin-orphanswanted/commits/master.atom date}} ===== Notes ===== * 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. ===== Feature Requests ===== * 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 [[https://github.com/samwilson/dokuwiki_sortablejs/archive/master.zip|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. * In addition to the "exclude"-switch I think an "**exclusive**" would also make sense; for if when you have a lot of namespaces or sub-namespaces but you only want to check a specific one (namespace or sub-namespace). ===== Discussion and Bugs===== Please raise bugs and requests for enhancements in [[https://github.com/lupo49/dokuwiki-plugin-orphanswanted/issues|GitHub]]. This page is not routinely monitored, so comments here may languish forever. ==== Compatibility ==== Only tested on Jack Jackrum but should work on Igor. --- [[user>Jaller|jaller]] //2023-05-30 19:37// Tried to make it work on Hogfather and everything looks OK. --- Fiisch //2023-11-03 15:15// ====Verbose?==== 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).//