#1385 closed Bug (fixed)
FCKeditor Converts to HTML on "Edit Conflict"
Reported by: | Stephen R | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | Project : MediaWiki+FCKeditor | Version: | SVN (FCKeditor) - Retired |
Keywords: | Confirmed HasPatch | Cc: |
Description
If you're in the process of making an edit and someone else edits the page, an "edit conflict" occurs. HOWEVER, unlike normal WikiText edits, FCKeditor compares the "new edited page" against an HTML marked-up version including your change.
As such, you can't just copy and paste the segments that you want to add to the new article. It's all lost in a bunch of HTML mark-up.
Attachments (4)
Change History (14)
comment:1 Changed 17 years ago by
comment:2 Changed 17 years ago by
Also related... if you "undo" a recent edit, it will compare the current revision (in wikitext) against the change (in html). This renders the comparison useless, since any changes are lost amidst the clutter.
Screenshot of this is attached.
comment:3 Changed 17 years ago by
Sorry for the many posts...
I think what's going on here is that in the case of previews, undos, and conflicts -- the HTML being rendered in the edit box doesn't get passed through the wikitext converter that is used when you just hit the "Save" button normally. I haven't looked at the code, but it seems like you could fix all three of these errors by moving the "convert_to_wikitext()" function earlier in the code execution.
comment:4 Changed 17 years ago by
Stephen, your observations are correct. I haven't investigated it deeply yet, but it seems the problem is that in wpTextbox1 we keep now HTML code and this textarea is used by diff command in MediaWiki.
The only solution I can think of now is to change the way how FCKeditor is being loaded.
comment:5 Changed 17 years ago by
Keywords: | Confirmed added |
---|---|
Priority: | High → Normal |
Changed 17 years ago by
Attachment: | conflict ie7 full.png added |
---|
Ful page showing issues of text in the FCK editor
comment:6 Changed 17 years ago by
The issus is also a problem in the text that is rendered within the FCK editor because it does not translate the wikitext into HTML. This should be an easy fix? it would ease the crippling nature of the issue as mods could at least be reapplied.
Changed 17 years ago by
Attachment: | 1385.patch added |
---|
comment:7 Changed 17 years ago by
Keywords: | HasPatch added |
---|
Patch provided by moisadoru at #fckeditor irc channel.
Manual edit is only required in older versions of MediaWiki.
In current MediaWiki SVN, the new hook (EditPageBeforeEditConflict) is already available:
comment:8 Changed 17 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
Fixed with [1929]. This will probably work with MediaWiki 1.12.1.
Earlier versions of MediaWiki have to be manually patched (new hook is required - see above):
For example in MW 1.11, in includes/EditPage.php, at the end of showEditForm function, find this code:
$wgOut->addHtml( wfHidden( 'wpAutoSummary', $autosumm ) ); if ( $this->isConflict ) { $wgOut->addWikiText( '==' . wfMsg( "yourdiff" ) . '==' );
and replace with:
$wgOut->addHtml( wfHidden( 'wpAutoSummary', $autosumm ) ); if ( $this->isConflict && wfRunHooks( 'EditPageBeforeConflictDiff', array( &$this, &$wgOut ) )) { $wgOut->addWikiText( '==' . wfMsg( "yourdiff" ) . '==' );
comment:9 Changed 17 years ago by
...actually this hook will be probably included in 1.13, so manual changes are required in MediaWiki 1.10-1.12.
Changed 17 years ago by
Attachment: | fix_for_1385_when_undo_can_be_performed.patch added |
---|
a fix for the showDiff() function called when the undo can be performed, when the needed hook is never called
comment:10 Changed 17 years ago by
I just added a patch for this particular issue, for the situation when you click on "show changes" button on the bottom, and the changeset can actualy be undone; in this case mediawiki has a different flow, and never calls the EditPageBeforeConflictDiff hook.
Related to ticket #1174, I believe.
http://dev.fckeditor.net/ticket/1174