Ticket #1770 (closed Bug: invalid)

Opened 10 months ago

Last modified 8 weeks ago

On save/preview we just see an empty preview

Reported by: TheDevilOnLine 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

Changed 10 months ago by TheDevilOnLine

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

Changed 10 months ago by TheDevilOnLine

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

Changed 10 months ago by fredck

  • keywords preview, empty, save removed
  • priority changed from High to Normal
  • component changed from Core : Output Data to Project : MediaWiki+FCKeditor

Changed 10 months ago by fredck

  • 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?

Changed 6 months ago by theonlyzby

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

Changed 5 months 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

Changed 8 weeks ago by arczi

  • status changed from new to closed
  • resolution set to invalid

This is not a FCKeditor bug

Note: See TracTickets for help on using tickets.