{"id":483,"date":"2015-10-19T18:55:36","date_gmt":"2015-10-19T16:55:36","guid":{"rendered":"http:\/\/blog.defrent.de\/?p=483"},"modified":"2019-03-21T15:23:36","modified_gmt":"2019-03-21T14:23:36","slug":"pmwiki-link-to-list-of-missing-or-orphaned-pages-wanted-pages","status":"publish","type":"post","link":"https:\/\/www.defrent.de\/en\/2015\/10\/pmwiki-link-to-list-of-missing-or-orphaned-pages-wanted-pages\/","title":{"rendered":"PmWiki: Link to List of Missing or Orphaned Pages (&#8220;Wanted Pages&#8221;)"},"content":{"rendered":"<div class=\"shariff shariff-align-left shariff-widget-align-left\" style=\"display:none\"><ul class=\"shariff-buttons theme-round orientation-horizontal buttonsize-small\"><li class=\"shariff-button mastodon\" style=\"background-color:#ccc\"><a href=\"https:\/\/s2f.kytta.dev\/?text=PmWiki%3A%20Link%20to%20List%20of%20Missing%20or%20Orphaned%20Pages%20%28%E2%80%9CWanted%20Pages%E2%80%9D%29 https%3A%2F%2Fwww.defrent.de%2Fen%2F2015%2F10%2Fpmwiki-link-to-list-of-missing-or-orphaned-pages-wanted-pages%2F via @defrentck@hessen.social\" title=\"Share on Mastodon\" aria-label=\"Share on Mastodon\" role=\"button\" rel=\"noopener nofollow\" class=\"shariff-link\" style=\"; background-color:#79b428; color:#fff\" target=\"_blank\"><span class=\"shariff-icon\" style=\"\"><svg width=\"75\" height=\"79\" viewBox=\"0 0 75 79\" fill=\"none\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\"><path d=\"M37.813-.025C32.462-.058 27.114.13 21.79.598c-8.544.621-17.214 5.58-20.203 13.931C-1.12 23.318.408 32.622.465 41.65c.375 7.316.943 14.78 3.392 21.73 4.365 9.465 14.781 14.537 24.782 15.385 7.64.698 15.761-.213 22.517-4.026a54.1 54.1 0 0 0 .01-6.232c-6.855 1.316-14.101 2.609-21.049 1.074-3.883-.88-6.876-4.237-7.25-8.215-1.53-3.988 3.78-.43 5.584-.883 9.048 1.224 18.282.776 27.303-.462 7.044-.837 14.26-4.788 16.65-11.833 2.263-6.135 1.215-12.79 1.698-19.177.06-3.84.09-7.692-.262-11.52C72.596 7.844 63.223.981 53.834.684a219.453 219.453 0 0 0-16.022-.71zm11.294 12.882c5.5-.067 10.801 4.143 11.67 9.653.338 1.48.471 3 .471 4.515v21.088h-8.357c-.07-7.588.153-15.182-.131-22.765-.587-4.368-7.04-5.747-9.672-2.397-2.422 3.04-1.47 7.155-1.67 10.735v6.392h-8.307c-.146-4.996.359-10.045-.404-15.002-1.108-4.218-7.809-5.565-10.094-1.666-1.685 3.046-.712 6.634-.976 9.936v14.767h-8.354c.109-8.165-.238-16.344.215-24.5.674-5.346 5.095-10.389 10.676-10.627 4.902-.739 10.103 2.038 12.053 6.631.375 1.435 1.76 1.932 1.994.084 1.844-3.704 5.501-6.739 9.785-6.771.367-.044.735-.068 1.101-.073z\"\/><defs><linearGradient id=\"paint0_linear_549_34\" x1=\"37.0692\" y1=\"0\" x2=\"37.0692\" y2=\"79\" gradientUnits=\"userSpaceOnUse\"><stop stop-color=\"#6364FF\"\/><stop offset=\"1\" stop-color=\"#563ACC\"\/><\/linearGradient><\/defs><\/svg><\/span><\/a><\/li><li class=\"shariff-button linkedin\" style=\"background-color:#ccc\"><a href=\"https:\/\/www.linkedin.com\/sharing\/share-offsite\/?url=https%3A%2F%2Fwww.defrent.de%2Fen%2F2015%2F10%2Fpmwiki-link-to-list-of-missing-or-orphaned-pages-wanted-pages%2F\" title=\"Share on LinkedIn\" aria-label=\"Share on LinkedIn\" role=\"button\" rel=\"noopener nofollow\" class=\"shariff-link\" style=\"; background-color:#79b428; color:#fff\" target=\"_blank\"><span class=\"shariff-icon\" style=\"\"><svg width=\"32px\" height=\"20px\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 27 32\"><path fill=\"#0077b5\" d=\"M6.2 11.2v17.7h-5.9v-17.7h5.9zM6.6 5.7q0 1.3-0.9 2.2t-2.4 0.9h0q-1.5 0-2.4-0.9t-0.9-2.2 0.9-2.2 2.4-0.9 2.4 0.9 0.9 2.2zM27.4 18.7v10.1h-5.9v-9.5q0-1.9-0.7-2.9t-2.3-1.1q-1.1 0-1.9 0.6t-1.2 1.5q-0.2 0.5-0.2 1.4v9.9h-5.9q0-7.1 0-11.6t0-5.3l0-0.9h5.9v2.6h0q0.4-0.6 0.7-1t1-0.9 1.6-0.8 2-0.3q3 0 4.9 2t1.9 6z\"\/><\/svg><\/span><\/a><\/li><li class=\"shariff-button xing\" style=\"background-color:#ccc\"><a href=\"https:\/\/www.xing.com\/spi\/shares\/new?url=https%3A%2F%2Fwww.defrent.de%2Fen%2F2015%2F10%2Fpmwiki-link-to-list-of-missing-or-orphaned-pages-wanted-pages%2F\" title=\"Share on XING\" aria-label=\"Share on XING\" role=\"button\" rel=\"noopener nofollow\" class=\"shariff-link\" style=\"; background-color:#79b428; color:#fff\" target=\"_blank\"><span class=\"shariff-icon\" style=\"\"><svg width=\"32px\" height=\"20px\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 25 32\"><path fill=\"#126567\" d=\"M10.7 11.9q-0.2 0.3-4.6 8.2-0.5 0.8-1.2 0.8h-4.3q-0.4 0-0.5-0.3t0-0.6l4.5-8q0 0 0 0l-2.9-5q-0.2-0.4 0-0.7 0.2-0.3 0.5-0.3h4.3q0.7 0 1.2 0.8zM25.1 0.4q0.2 0.3 0 0.7l-9.4 16.7 6 11q0.2 0.4 0 0.6-0.2 0.3-0.6 0.3h-4.3q-0.7 0-1.2-0.8l-6-11.1q0.3-0.6 9.5-16.8 0.4-0.8 1.2-0.8h4.3q0.4 0 0.5 0.3z\"\/><\/svg><\/span><\/a><\/li><li class=\"shariff-button facebook\" style=\"background-color:#ccc\"><a href=\"https:\/\/www.facebook.com\/sharer\/sharer.php?u=https%3A%2F%2Fwww.defrent.de%2Fen%2F2015%2F10%2Fpmwiki-link-to-list-of-missing-or-orphaned-pages-wanted-pages%2F\" title=\"Share on Facebook\" aria-label=\"Share on Facebook\" role=\"button\" rel=\"nofollow\" class=\"shariff-link\" style=\"; background-color:#79b428; color:#fff\" target=\"_blank\"><span class=\"shariff-icon\" style=\"\"><svg width=\"32px\" height=\"20px\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 18 32\"><path fill=\"#3b5998\" d=\"M17.1 0.2v4.7h-2.8q-1.5 0-2.1 0.6t-0.5 1.9v3.4h5.2l-0.7 5.3h-4.5v13.6h-5.5v-13.6h-4.5v-5.3h4.5v-3.9q0-3.3 1.9-5.2t5-1.8q2.6 0 4.1 0.2z\"\/><\/svg><\/span><\/a><\/li><li class=\"shariff-button twitter\" style=\"background-color:#ccc\"><a href=\"https:\/\/twitter.com\/share?url=https%3A%2F%2Fwww.defrent.de%2Fen%2F2015%2F10%2Fpmwiki-link-to-list-of-missing-or-orphaned-pages-wanted-pages%2F&text=PmWiki%3A%20Link%20to%20List%20of%20Missing%20or%20Orphaned%20Pages%20%28%E2%80%9CWanted%20Pages%E2%80%9D%29\" title=\"Share on X\" aria-label=\"Share on X\" role=\"button\" rel=\"noopener nofollow\" class=\"shariff-link\" style=\"; background-color:#79b428; color:#fff\" target=\"_blank\"><span class=\"shariff-icon\" style=\"\"><svg width=\"32px\" height=\"20px\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 24 24\"><path fill=\"#000\" d=\"M14.258 10.152L23.176 0h-2.113l-7.747 8.813L7.133 0H0l9.352 13.328L0 23.973h2.113l8.176-9.309 6.531 9.309h7.133zm-2.895 3.293l-.949-1.328L2.875 1.56h3.246l6.086 8.523.945 1.328 7.91 11.078h-3.246zm0 0\"\/><\/svg><\/span><\/a><\/li><\/ul><\/div><p>Now this is entirely out of the usual scope of what I&#8217;m writing about here, but it was so difficult an answer to find that I just <em>have<\/em> to publish it.<\/p>\n<p><strong>The objective:<\/strong> Provide users with a <em>list of all missing pages<\/em> in your instance of <a href=\"http:\/\/www.pmwiki.org\" target=\"_blank\" rel=\"noopener noreferrer\">PmWiki<\/a> (sometimes called &#8220;Wanted Pages&#8221; in that huge search engine&#8217;s results), so that writers can concentrate on filling in the blanks instead of re-re-re-rewriting existing articles.<\/p>\n<p><strong>A way towards solution:<\/strong> One solution is PmWiki&#8217;s on-board <em>RefCount<\/em> function, which is said to <a href=\"http:\/\/www.pmwiki.org\/wiki\/PmWiki\/RefCount\" target=\"_blank\" rel=\"noopener noreferrer\">need activation in config.php<\/a> with&nbsp;<span class=\"st\"><code class=\"escaped\">include_once(\"$FarmD\/scripts\/refcount.php\");<\/code><\/span> but worked without me doing anything like that in version 2.2.80 (October 2015) &#8211; or maybe I forgot that I did. Ahem. Anyways, if <em>RefCount<\/em> is active, you can use the <code>?action=RefCount<\/code> to search for a variety of types of pages, including &#8220;All&#8221;, &#8220;Existing&#8221;, &#8220;Missing&#8221; or &#8220;Orphaned&#8221; pages.<\/p>\n<p>Of course, linking to that <em>page action<\/em> doesn&#8217;t help at all when you want to provide your users with a ready-made list such as <code class=\"escaped\">(:pagelist:)<\/code> or <code>(:searchresults:)<\/code> would produce.<\/p>\n<p><strong>The solution is:<\/strong> Pass arguments to <em>RefCount<\/em> within the URL, that is, as a &#8220;query string&#8221;!<\/p>\n<p>The answer came to me in the form of <a href=\"http:\/\/pmichaud.com\/pipermail\/pmwiki-users\/2006-February\/023401.html\" target=\"_blank\" rel=\"noopener noreferrer\">a long-buried PmWiki-users list post from 2006 by genius Kurt Devlin<\/a>, which not only recommended to give the <em>RefCount<\/em> form its arguments (including &#8220;submit&#8221;!) within the query string, but also to <em>escape the brackets<\/em> when using this URL in a WikiLink:<\/p>\n<blockquote><p>I wound up forcing the form parameters onto the command line. My first attempt at this was using broken, but it looks like it&#8217;s working now. This<br \/>\nshould get me by until pagelist is updated.<\/p>\n<p><code>http:\/\/www.pmwiki.org\/wiki\/Main\/HomePage?action=refcount&whichrefs=missing&tlist%5B%5D=PmWiki&flist%5B%5D=PmWiki&showrefs=checked&submit=Search<\/code><\/p>\n<p>To get this to work as a wiki link, I had to escape the brackets. For example,<br \/>\n<code>* [[Main.HomePage?action=refcount&amp;whichrefs=missing<span style=\"color: #ff0000;\">&amp;tlist%5B%5D=all<\/span>&amp;flist%5B%5D=all&amp;showrefs=checked&amp;submit=Search | 'Most Wanted' List]]<\/code><\/p><\/blockquote>\n<p>This, however, didn&#8217;t let me <span style=\"color: #ff0000;\">filter by groups<\/span>, and the first thing when I saw brackets was an intuitive &#8211; and totally wrong: <em>&#8220;Grumph. This must be Arrrrray Thingy! Must fill edged brackets with comma-separated Group entries to filter results by. Ugh!&#8221;<\/em> If I had taken a closer look at Kurt&#8217;s example, then I would immediately have seen what <a href=\"http:\/\/stackoverflow.com\/questions\/6243051\/how-to-pass-an-array-within-a-query-string\" target=\"_blank\" rel=\"noopener noreferrer\">this stackoverflow answer<\/a> points out: In query strings, you want to fill arrays by doing <code>&amp;myArray[]=newEntry<\/code> <em>for each new entry<\/em> you want to add to that array.<\/p>\n<p>Thus, to show my users all currently empty but linked to articles in their 3 Categories of interest, &#8220;SessionLogs&#8221;, &#8220;Players&#8221; and &#8220;Characters&#8221; and omit all those &#8220;missing pages&#8221; in PmWiki\/ or Site\/ etc.), I needed to do:<\/p>\n<p><code>* [[Main.HomePage?action=refcount&amp;whichrefs=missing<span style=\"color: #ff0000;\">&amp;tlist%5B%5D=SessionLogs&amp;tlist%5B%5D=Players&amp;tlist%5B%5D=Characters<\/span>&amp;flist%5B%5D=all&amp;showrefs=checked&amp;submit=Search | Missing Pages to Edit Stuff Into]]<\/code><\/p>\n<p><strong>Et voil\u00e0! <\/strong>(translator&#8217;s note, because I saw it again during my search: No, it&#8217;s <em>not<\/em> written &#8220;et viola&#8221;, because it&#8217;s not about French string instruments but about something previously hidden that&#8217;s appearing suddenly)<\/p>\n<p>I hope this helps someone spare the time I needed to dig it. <em>No idea<\/em> why it isn&#8217;t directly in PmWiki&#8217;s documentation of RefCount, useful as it is.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Now this is entirely out of the usual scope of what I&#8217;m writing about here, but it was so difficult an answer to find that I just have to publish it. The objective: Provide users with a list of all missing pages in your instance of PmWiki (sometimes called &#8220;Wanted Pages&#8221; in that huge search<\/p><\/div>\n<div class=\"blog-btn\"><a href=\"https:\/\/www.defrent.de\/en\/2015\/10\/pmwiki-link-to-list-of-missing-or-orphaned-pages-wanted-pages\/\" class=\"home-blog-btn\">Read More<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"activitypub_content_warning":"","activitypub_content_visibility":"","activitypub_max_image_attachments":4,"activitypub_interaction_policy_quote":"anyone","activitypub_status":"","footnotes":""},"categories":[21,23],"tags":[],"class_list":["post-483","post","type-post","status-publish","format-standard","hentry","category-de","category-howto-de"],"aioseo_notices":[],"featured_image_src":null,"featured_image_src_square":null,"author_info":{"display_name":"Christopher K\u00f6bel","author_link":"https:\/\/www.defrent.de\/en\/author\/defrenter\/"},"_links":{"self":[{"href":"https:\/\/www.defrent.de\/en\/wp-json\/wp\/v2\/posts\/483","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.defrent.de\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.defrent.de\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.defrent.de\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.defrent.de\/en\/wp-json\/wp\/v2\/comments?post=483"}],"version-history":[{"count":2,"href":"https:\/\/www.defrent.de\/en\/wp-json\/wp\/v2\/posts\/483\/revisions"}],"predecessor-version":[{"id":1113,"href":"https:\/\/www.defrent.de\/en\/wp-json\/wp\/v2\/posts\/483\/revisions\/1113"}],"wp:attachment":[{"href":"https:\/\/www.defrent.de\/en\/wp-json\/wp\/v2\/media?parent=483"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.defrent.de\/en\/wp-json\/wp\/v2\/categories?post=483"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.defrent.de\/en\/wp-json\/wp\/v2\/tags?post=483"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}