Description

Pages that are linked (direct or indirect linkage between the pages) to other pages via the include macro, show up as orphaned. The same happens for pages that are linked via the TemplateList or PageList macros.

Steps to reproduce

  1. create an new page
  2. include it in another
  3. it will show up as an orphan in OrphanedPages

Details

Python Version

MoinMoin Version

Workaround

here is a patch to the include macro to fix the problem by adding the linkage to the cached info

Index: Include.py
===================================================================
--- Include.py  (revision 183)
+++ Include.py  (revision 202)
@@ -114,6 +114,9 @@
             continue
         inc_page._macroInclude_pagelist = this_page._macroInclude_pagelist

+        # store the included page as a page linkage
+        macro.formatter.pagelink(1, pagename=inc_page.page_name)
+
         # check for "from" and "to" arguments (allowing partial includes)
         body = inc_page.get_raw_body() + '\n'
         from_pos = 0

Discussion

This looks like an incorrect fix. The problem is that include and other macros are not running in pagelink mode.

Plan


CategoryMoinMoinBug

MoinMoin: MoinMoinBugs/OrphanedPagesListsIncludedPages (last edited 2008-03-18 18:01:12 by p5B055566)