Description
When the Include macro is called recursively, the edit icon for the inner expansion sets the "backto" parameter to point to its parent page rather than the toplevel page. So if a person clicks the edit icon to edit a nested page, after editing the page the user will be returned to a page that is neither the original page nor the page that was edited.
Example
At the bottom of this page I'll use the macro to include ../IncludeNotCacheAware, which is a relatively small page that includes yet another small page. You'll notice that its edit icon does not set "backto" to be this page.
Details
This Wiki
Discussion
Plan
- Priority: medium
Assigned to: OliverGraf
- Status: fixed in moin--main--1.3--patch-72
Example
Description
If a user provides to="regex" and/or from="regex" arguments to the Include macro and the page that is being included is cached, the whole cached copy gets included rather than the desired piece.
Example
[[Include(HelpTemplate,, to="^=== Example")]] includes the whole HelpTemplate page rather than stopping before the "Example" heading:
Template for Help Pages
Text.
Details
MoinMoin Version |
1.2.1 |
The bug also appears to be in the latest version of Include.py (1.27) in CVS. We don't use CVS any more, so this is no wonder.
Discussion
Easy fix: on line 159 of Include.py, change
inc_page.set_raw_body(body[from_pos:to_pos])
to
inc_page.set_raw_body(body[from_pos:to_pos], modified=1)
(A workaround is to disable caching.)
Update: This is still a bug in version 1.2.2, it bit me my blog page. -- AdamShand
Plan
- Priority: medium
Assigned to: OliverGraf
- Status: fixed in moin--main--1.3--patch-72