Wiki source for Mod011bEditPreviewBug


Show raw source

==== Wikka Mod 011 ====
Type: Bug Fix
----
===Credit:===
**DreckFehler**
[[http://www.wakkawiki.com/WakkaCustomization | WakkaCustomization @ WakkaWiki]]
----

= Bug in edit.php! =

There's a bug in the edit-handler, which locks you up, when you preview a page containing a form itself. The problem is that the html-code (containing a form itself) is placed within the edit-form (i.e. after the opening **<form...>**-tag and before the closing **</form>**).

Try it yourself with the TextSearch-page. Visit that page, edit it, hit "preview" and try to re-edit. got it? ;)

You can fix that problem by editing the file edit.php (in the "handlers/page"-directory).

search for this line:

**$output .= $this->Format($body);**

and move it upwards after the line

**$output .= "<div class=\"commentinfo\">Preview</div>\n";**

the next two lines will open the editor-form (those three buttons at the bottom of the preview-page):

**$output .=
$this->""FormOpen""("edit")."\n".**

so you'll have two different forms on the preview-page, which aren't nested anymore (that was the problem, why the preview is screwed up).

voila!

-- DreckFehler
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki