Opened 17 years ago

Closed 16 years ago

#1770 closed Bug (invalid)

On save/preview we just see an empty preview

Reported by: Tom Maaswinkel Owned by:
Priority: Normal Milestone:
Component: Project : MediaWiki+FCKeditor Version:
Keywords: WorksForMe Cc:

Description

When you save/preview a page that hasn't been edited or just had some minor edits (like an extra . or so), it just shows 'This is only a preview; changes have not yet been saved!' and all content is removed. It only happens with IE 6.0, and not with FF...

Change History (7)

comment:1 Changed 17 years ago by Tom Maaswinkel

Just got the latest Nightly Build, and that version also got the same bug!

comment:2 Changed 17 years ago by Tom Maaswinkel

Before I forget, this is meant for the "MediaWiki+FCKeditor" bug list ;-)

comment:3 Changed 17 years ago by Frederico Caldeira Knabben

Component: Core : Output DataProject : MediaWiki+FCKeditor
Keywords: preview empty save removed
Priority: HighNormal

comment:4 Changed 17 years ago by Frederico Caldeira Knabben

Keywords: WorksForMe added

I just went to the demo sand box and it worked for me with IE6.

Do you have more information for it? Does it work for you with the above URL?

comment:5 Changed 17 years ago by Henry2.0

I encountered the exact same problem. I had the impression there is a mix between the POST data information present in the FORM and the action="index.php?title=test&action=submit". So I decided to filter is &action=submit out of the URL to place it as hidden value, which seems to work ... for us at least!;-)

So, find the following code block into EditPage.php (into includes directory):
(Tip: The error is around the <form id= , so search for this.)

		$safemodehtml = $this->checkUnicodeCompliantBrowser()
			? '' : Xml::hidden( 'safemode', '1' );

		$wgOut->addHTML( <<<END
{$toolbar}
<form id="editform" name="editform" method="post" action="$action" enctype="multipart/form-data">
END
);

		if( is_callable( $formCallback ) ) {
			call_user_func_array( $formCallback, array( &$wgOut ) );
		}

		wfRunHooks( 'EditPage::showEditForm:fields', array( &$this, &$wgOut ) );

		// Put these up at the top to ensure they aren't lost on early form submission
		$wgOut->addHTML( "
<input type='hidden' value=\"" . htmlspecialchars( $this->section ) . "\" name=\"wpSection\" />

And replace it by:

		$safemodehtml = $this->checkUnicodeCompliantBrowser()
			? '' : Xml::hidden( 'safemode', '1' );

// HeBo MOD Preview Bug
//$action = "/wiki/index.php?title=Secure_UC"; ... Removes &action=submit
$action_post= "";
$action_before = $action;
$action = str_replace("&amp;action=submit","",$action);
if ($action_before!=$action) {
  $action_post = "<input type='hidden' name=\"action\" value=\"submit\" />";
}

		$wgOut->addHTML( <<<END
{$toolbar}
<form id="editform" name="editform" method="post" action="$action" enctype="multipart/form-data">
END
);

		if( is_callable( $formCallback ) ) {
			call_user_func_array( $formCallback, array( &$wgOut ) );
		}

		wfRunHooks( 'EditPage::showEditForm:fields', array( &$this, &$wgOut ) );

		// Put these up at the top to ensure they aren't lost on early form submission
		$wgOut->addHTML( "
" . $action_post ."
<input type='hidden' value=\"" . htmlspecialchars( $this->section ) . "\" name=\"wpSection\" />

I hope this will help, Henry2.0

comment:6 Changed 17 years ago by zorroDogs

I have the exact same prob using mediawiki 1.12 w/ semantic forms extension. Work in FF but not IE7. Will try your solution. Thanks

comment:7 Changed 16 years ago by Artur Formella

Resolution: invalid
Status: newclosed

This is not a FCKeditor bug

Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy