Opened 16 years ago
Closed 16 years ago
#2508 closed Bug (fixed)
<ref> and <references /> tags break on edit
Reported by: | Oliver C. Radke | Owned by: | Artur Formella |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | Project : MediaWiki+FCKeditor | Version: | FCKeditor 2.6.3 |
Keywords: | Confirmed Review+ | Cc: | oradke@… |
Description
On editing a page with a <references /> tag at the end, the tag is replaced by wikicode:
<references />
Attachments (2)
Change History (18)
comment:1 Changed 16 years ago by
Keywords: | Pending WorksForMe added |
---|
comment:2 Changed 16 years ago by
Here's how to reproduce it (Mediawiki 1.13, FCKEditor 2.6.3, latest SVN trunk, cite installed). Create a new page, enter a text with references:
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. <ref>http://www.nasa.gov</ref><br> = References = <references />
Click "Preview". Text shows correctly, but when you look at the wikitext inside the FCKEditor, it looks like this:
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. <ref>http://www.nasa.gov</ref><br> = References = <references />
comment:3 Changed 16 years ago by
Summary: | <references /> tag breaks on edit → <ref> and <references /> tags break on edit |
---|
I could reproduce it on latest Mediawiki 1.12 as well. Both <references /> and the <ref> tags are broken. I can provide a login to a test machine if that helps.
comment:4 follow-up: 5 Changed 16 years ago by
Cc: | oradke@… added |
---|
Button to insert <references />-Tag works, but tags are still converted to "<references />" on preview. It works on http://mediawiki.fckeditor.net, but not on my server. Any idea?
comment:5 Changed 16 years ago by
comment:6 Changed 16 years ago by
Same thing occurs here, when you edit it in wikitext there isn't a problem, the problem lies when you open they page again for editing it automatically converts those tags to <references /> instead of preserving the tags. One thing I did notice is that the version of Cite is different, not sure if that's a factor but the http://mediawiki.fckeditor.net site doesn't actually state which version it is using. Unfortunately it has gotten to the point that I've had to discourage people from using the editor so that it doesn't break large pages that use lots of reference links.
comment:7 Changed 16 years ago by
Keywords: | Confirmed added; Pending WorksForMe removed |
---|---|
Owner: | set to Artur Formella |
Status: | new → assigned |
Confirmed. Latest version (40290) of Cite is incompatible with the current MediaWiki+FCKeditor extension
Changed 16 years ago by
Attachment: | 2508.patch added |
---|
comment:8 Changed 16 years ago by
Keywords: | Review? added |
---|
comment:9 Changed 16 years ago by
Can't apply patch. Using last SVN revision of MediaWiki+FCKeditor and Cite.
$ patch -p0 < 2508.patch (Stripping trailing CRs from patch.) patching file FCKeditorParser.body.php Hunk #1 FAILED at 153. Hunk #2 FAILED at 166. Hunk #3 FAILED at 179. Hunk #4 FAILED at 199. 4 out of 4 hunks FAILED -- saving rejects to file FCKeditorParser.body.php.rej (Stripping trailing CRs from patch.) patching file mw12/FCKeditorParser_OldPP.body.php Hunk #1 FAILED at 154. Hunk #2 FAILED at 167. Hunk #3 FAILED at 180. Hunk #4 FAILED at 200. 4 out of 4 hunks FAILED -- saving rejects to file mw12/FCKeditorParser_OldPP.body.php.rej
comment:10 Changed 16 years ago by
Same goes with:
svn up -r "{2008-10-15 10:11:15 +0200}"
Can't apply the patch... Is it something wrong with me?
comment:11 Changed 16 years ago by
comment:12 Changed 16 years ago by
Keywords: | Review? removed |
---|
Changed 16 years ago by
Attachment: | 2508 _2.patch added |
---|
comment:13 Changed 16 years ago by
Keywords: | Review? added |
---|
comment:14 Changed 16 years ago by
At first I couldn't apply your new patch, and then I figured that it's because your patches contain DOS newlines (\r\n) instead of UNIX newlines (\n) in the diff-specific lines (it's fine to have \r\n in the source-code lines, tho). I replaced the \r\n in the diff lines by \n and I could apply the patch. My system is fedora-core 6.
Anyway, about the patch itself, the new one works with the last SVN versions of everything. Thanks and I hope it gets integrated in the SVN soon.
comment:15 Changed 16 years ago by
Tried the patch, works fine (MediaWiki 13.2., latest Cite and fckeditor SVN). Problem solved!
comment:16 Changed 16 years ago by
Keywords: | Review+ added; Review? removed |
---|---|
Resolution: | → fixed |
Status: | assigned → closed |
Fixed with [3229] (the patch was outdated so I have manually applied all changes and did some minor corrections).
There is one ugly hack in this solution - ParserBeforeStrip hook was used to call the depraciated strip() function in MediaWiki 1.14.
Dou you have Cite extension installed? It seems to work on http://mediawiki.fckeditor.net.
Make sure that you're typing
<references />
in the Wikitext mode.