[Home]WikiBugs/Editlinks Mangles Pages In Special Cases

UseModWiki | WikiBugs | RecentChanges | Preferences

If you use action=editlinks to rename a page like =OldPageName=NewPageName and an updated page with a link to the renamed page consist pre tags within nowiki tags like <nowiki><pre>Text</pre></nowiki> the part within the pre tags and the tags themselves vanish and get replaced by 0 (superscript 3, 0, superscript 3). Previous versions of the page get changed too, so you can't recover what is lost. Such constructs exist on MeatBall:TextFormattingRules.

I'm using UseModWiki Version 0.92 -- mailto:suelmann@gmx.de

I think I've found the problem with this one. In the function SubstituteTextLinks?, there is a line at the end that says:
  $text =~ s/$FS(\d+)$FS/$SaveUrl{$1}/ge;   # Restore saved text

This has to be duplicated - ie the transformation has to be performed twice, in order to catch 'nested saved text' (as is done elsewhere - for example in WikiToHTML).

This appears to solve this problem - Warning though - I've not checked for side effects, so maybe someone with a bit more knowledge of the script could comment?

I also have no idea what would happen if you had 3 levels of nesting (ie nowiki, pre and code all together!)

KevinTaylor


Rather than just do the substitute twice, perhaps the following would be better.

  1 while $text =~ s/$FS(\d+)$FS/$SaveUrl{$1}/ge;   # Restore saved text

This should iterate though all levels of nesting, stopping when there is nothing else to replace.

--DavidClaughton

I have adopted this fix for 1.0. --CliffordAdams


Double double-quotes disappear

There may be a second error in this context: Often (always?) double double-quotes on other pages disappear when renaming pages (e.g. WikiWikis).

--StefanTrcek

I'm not sure what to do about this--I don't see any easy fixes. Personally I think that Free Links are better than the double-double-quote convention--one can rewrite the link above with free links like [[WikiWiki]]s (displays as WikiWikis). No fix planned for 1.0 release. --CliffordAdams

UseModWiki | WikiBugs | RecentChanges | Preferences
Edit text of this page | View other revisions | Search MetaWiki
Last edited March 29, 2005 4:56 pm by MarkusLude (diff)
Search: