Last modified: 2013-04-22 16:16:18 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?
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).
(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.
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).
(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.
(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.
In gerrit: https://gerrit.wikimedia.org/r/23171
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/
Merged in masters of core and LiquidTreads, backported to wmf12, deployed.
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.