Page MenuHomePhabricator

Live Preview chops returned text
Closed, ResolvedPublic

Description

Author: MediaWiki

Description:
When previewing articles longer than somewhere around 2-4 KB using the experimental Live Preview option, the content returned and displayed is chopped off, again somewhere between 2 and 4 KB into the text (HTML-inclusive, it seems). If the Live Preview feature is going to work at all, it cannot chop text like this.


Version: 1.12.x
Severity: normal

Details

Reference
bz11438

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 9:59 PM
bzimport set Reference to bz11438.
bzimport added a subscriber: Unknown Object (MLST).

I've committed my version of live preview, which fixes this issue, to svn (r26073).

MediaWiki wrote:

Wow, that was fast. Were you already working on it or was it a "duh" solution? Or are you just quick? ;) Anyway, thanks; looking forward to 1.12...

MediaWiki wrote:

If it were mission-critical, I'd probably set up a way for my computer to automatically update the wiki to SVN every week or something, so I could run bleeding-edge fixes, but a patch should be sufficient. The only problem is, I don't know how to apply a patch; my text editor doesn't exactly say...

Anyone know if there are plans for 1.11.1 or 1.11.2 releases? Or are we going to go from 1.11.0 to 1.12.0?

(In reply to comment #3)

http://svn.wikimedia.org/viewvc/mediawiki/trunk/phase3/skins/common/preview.js?r1=26073&r2=26072&pathrev=26073

That should be http://svn.wikimedia.org/viewvc/mediawiki/trunk/phase3/skins/common/preview.js?r1=26073&r2=26072&pathrev=26073&view=patch

(In reply to comment #4)

If it were mission-critical, I'd probably set up a way for my computer to
automatically update the wiki to SVN every week or something, so I could run
bleeding-edge fixes, but a patch should be sufficient. The only problem is, I
don't know how to apply a patch; my text editor doesn't exactly say...

If you run a Linux/UNIX system, you can enter the following on the command line:

cd /where/your/mediawiki/installation/is
patch -p2 --dry-run < /where/your/patch/is/name_of_patch_file

If no errors are returned (only 'patching file includes/EditPage.php' and the like), you can do it for real:

patch -p2 < /where/your/patch/is/name_of_patch_file

If you're on Windows, or don't have command line access, or can't make the patch -p2 thing work, you can always apply the patch manually by removing all lines marked with a '-' and adding all lines marked with a '+'. This is probably a pain in the ass, so you might wanna look for a text editor or some other program that can apply patches.

Anyone know if there are plans for 1.11.1 or 1.11.2 releases? Or are we going
to go from 1.11.0 to 1.12.0?

1.11.1 will only contain security fixes relative to 1.11.0, so this one won't be included until 1.12rc1.

MediaWiki wrote:

Thanks, Mr. Kattouw, that clarifies a lot. I thought new features were only for major releases, but I thought I'd ask anyway.

I wish I had Linux, but I'm on Windows, since this is just a homework computer from my school with a server, database, and PHP installed (I'm probably bending/breaking a rule, but MediaWiki is worth it ;) ). I'll go over the documentation for my text editor carefully to look for patching instructions, and if I don't find them, I'll either do the manual thing or look for a patch-supporting one. I'm pretty convinced that a developer's editor like Notepad++ will have patch support; I just have to find it.

And then I'll wipe Windows XP and install Linux. :P Just kidding. Though it's not a bad idea...

MediaWiki wrote:

I'm reopening this bug because, now that I test the latest preview.js file, the Live Preview button seems to just do a normal preview. Something glitched...

Live preview is supposed to be like normal preview but without page loads because it uses ajax. Or do you mean something else?

MediaWiki wrote:

(In reply to comment #9)

Live preview is supposed to be like normal preview but without page loads
because it uses ajax. Or do you mean something else?

I wasn't clear enough, I guess. I mean it's actually behaving as if Live Preview just isn't enabled. The whole page reloads and action=edit in the URL changes to action=submit. If I go back to the code released with 1.11.0, it behaves properly, but then the text-chopping comes back.

The original bug is fixed. Live preview is not currently supported.