From 6c1e4cfdd2bc5614334404234c1518c6ce3479ed Mon Sep 17 00:00:00 2001 From: Catrope Date: Wed, 17 Apr 2013 09:34:36 -0700 Subject: [PATCH] Partly fix the "Report problem" button This was broken ever since the introduction of IndexValueStore, because the call to getDataFromDom() wasn't updated, so it crashed with a "doc is undefined" error. Fixing part of this by passing in a new IVStore. The data that is transmitted over the wire still has indices with no way to find out what the corresponding annotations are. It needs to be fully expanded but there's no way to do this in DM quite yet. Bug: 47319 Change-Id: I761523d22e51ac560e37ae991d01a6b84224ca40 --- modules/ve/init/mw/ve.init.mw.Target.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/ve/init/mw/ve.init.mw.Target.js b/modules/ve/init/mw/ve.init.mw.Target.js index d280e68450..799a38235f 100644 --- a/modules/ve/init/mw/ve.init.mw.Target.js +++ b/modules/ve/init/mw/ve.init.mw.Target.js @@ -586,7 +586,10 @@ ve.init.mw.Target.prototype.reportProblem = function ( message ) { 'originalHtml': this.originalHtml, 'originalData': // originalHTML only has the body's HTML for now, see TODO comment in ve.init.mw.ViewPageTarget.prototype.setUpSurface - ve.dm.converter.getDataFromDom( ve.createDocumentFromHTML( '' + this.originalHtml + '') ), + // FIXME: need to expand this data before sending it, see bug 47319 + ve.dm.converter.getDataFromDom( store, + ve.createDocumentFromHTML( '' + this.originalHtml + '' ) + ), 'editedData': editedData, 'editedHtml': ve.dm.converter.getDomFromData( store, editedData ).body.innerHTML, 'wiki': mw.config.get( 'wgDBname' )