Last modified: 2013-04-22 16:16:18 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T42083, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 40083 - Preview broken on thread reply posting/edit (Uncaught Exception in JavaScript)
Preview broken on thread reply posting/edit (Uncaught Exception in JavaScript)
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
LiquidThreads (Other open bugs)
master
All All
: Normal normal with 1 vote (vote)
: ---
Assigned To: Bartosz Dziewoński
:
Depends on:
Blocks: 39480
  Show dependency treegraph
 
Reported: 2012-09-07 14:40 UTC by Nemo
Modified: 2013-04-22 16:16 UTC (History)
6 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Nemo 2012-09-07 14:40:39 UTC
Steps to reproduce:
1) Go to https://translatewiki.net/wiki/User_talk:SiebrandLqtTest , choose one reply.
2) More > Edit > show preview (by clinking or accesskey).
3) No preview is shown and the page is centred on the "Subject" anchor.

Probably related to bug 39773?
Comment 1 Helder 2012-09-07 19:20:48 UTC
This is because "doLivePreview" is not defined on Translatewiki.net (I'm not sure why).

BTW: I noticed there is no window.wg*** variables except "window.wgWikiEditorIconVersion" available on Translatewiki. They are only acessible through mw.config (e.g.: mw.config.get('wgServer')). Maybe there was some configuration change which cleared the window object (removing also the doLivePreview which is used by LQT).
Comment 2 Nemo 2012-09-07 19:24:57 UTC
(In reply to comment #1)
> This is because "doLivePreview" is not defined on Translatewiki.net (I'm not
> sure why).
> 
> BTW: I noticed there is no window.wg*** variables except
> "window.wgWikiEditorIconVersion" available on Translatewiki. They are only
> acessible through mw.config (e.g.: mw.config.get('wgServer')). Maybe there was
> some configuration change which cleared the window object (removing also the
> doLivePreview which is used by LQT).

You can find out why yourself on: https://gerrit.wikimedia.org/r/gitweb?p=translatewiki.git;a=tree
Cc Niklas anyway.
Comment 3 Bartosz Dziewoński 2012-09-07 19:26:09 UTC
Whoops, I may have broken it in gerrit change I57e2fc0b, changing "window.doLivePreview = function..." to "var doLivePreview = function...".

Also, LivePreview since recently depends on jquery.form (gerrit change Ifcc7e7c5). This seems to also be causing problems (or maybe it's the real issue, as I've only gotten an error related to formToArray() being undefined when testing).
Comment 4 Helder 2012-09-07 19:46:01 UTC
(In reply to comment #2)
> You can find out why yourself on:
> https://gerrit.wikimedia.org/r/gitweb?p=translatewiki.git;a=tree
> Cc Niklas anyway.

The [[Manual:$wgLegacyJavaScriptGlobals]] is set to false on TranslatewikiSettings.php since it was created on gerrit change Ib9444cab.
Comment 5 Helder 2012-09-08 12:51:51 UTC
(In reply to comment #3)
> Whoops, I may have broken it in gerrit change I57e2fc0b, changing
> "window.doLivePreview = function..." to "var doLivePreview = function...".
> 
> Also, LivePreview since recently depends on jquery.form (gerrit change
> Ifcc7e7c5). This seems to also be causing problems (or maybe it's the real
> issue, as I've only gotten an error related to formToArray() being undefined
> when testing).

I'm getting
Uncaught TypeError: Object [object Object] has no method 'formToArray' 
when I try to preview a comment on Portuguese Wikibooks.
Comment 6 Bartosz Dziewoński 2012-09-08 13:41:42 UTC
In gerrit: https://gerrit.wikimedia.org/r/23171
Comment 7 Bartosz Dziewoński 2012-09-20 12:12:59 UTC
This is partially fixed now - with this patch merged, the preview at least works, but no AJAX. This patch needs merging too: https://gerrit.wikimedia.org/r/#/c/23862/
Comment 8 Krinkle 2012-09-21 03:06:33 UTC
Merged in masters of core and LiquidTreads, backported to wmf12, deployed.
Comment 9 Niklas Laxström 2012-09-21 08:01:46 UTC
Thanks for the fix. Though it would be nice if someone actually cared about the bugs we report from translatewiki.net before they hit production in wmf cluster.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links