Catrope has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/59642


Change subject: Partly fix the Report problem button
......................................................................

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
---
M modules/ve/init/mw/ve.init.mw.Target.js
1 file changed, 4 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor 
refs/changes/42/59642/1

diff --git a/modules/ve/init/mw/ve.init.mw.Target.js 
b/modules/ve/init/mw/ve.init.mw.Target.js
index 05abd6f..da45b8f 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 @@
                        '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( '<body>' + this.originalHtml  + '</body>') ),
+                               // FIXME: need to expand this data before 
sending it, see bug 47319
+                               ve.dm.converter.getDataFromDom( new 
ve.dm.IndexValueStore(),
+                                       ve.createDocumentFromHTML( '<body>' + 
this.originalHtml  + '</body>' )
+                       ),
                        'editedData': editedData,
                        'editedHtml': ve.dm.converter.getDomFromData( store, 
editedData ).body.innerHTML,
                        'wiki': mw.config.get( 'wgDBname' )

-- 
To view, visit https://gerrit.wikimedia.org/r/59642
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I761523d22e51ac560e37ae991d01a6b84224ca40
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Catrope <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to