jenkins-bot has submitted this change and it was merged.

Change subject: Disable debug print for missing DSR
......................................................................


Disable debug print for missing DSR

From investigating a few cases from the logs it looks like the main case
without a DSR is a DOMFragment inside extension or transclusion content.
Document this and disable the debug print, as this case is actually pretty
common.

Change-Id: Ibf826dd72e3576fba8a04fa91e931b8e4d7cae46
---
M js/lib/mediawiki.DOMPostProcessor.js
1 file changed, 9 insertions(+), 3 deletions(-)

Approvals:
  GWicke: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/js/lib/mediawiki.DOMPostProcessor.js 
b/js/lib/mediawiki.DOMPostProcessor.js
index cecd306..0804180 100644
--- a/js/lib/mediawiki.DOMPostProcessor.js
+++ b/js/lib/mediawiki.DOMPostProcessor.js
@@ -2645,7 +2645,11 @@
                        }
 
                        var dsr = node.data.parsoid.dsr;
-                       // FIXME: Not sure why this would be missing
+                       // There is currently no DSR for DOMFragments nested 
inside
+                       // transclusion / extension content (extension inside 
template
+                       // content etc).
+                       // TODO: Make sure that is the only reason for not 
having a DSR
+                       // here.
                        if (dsr) {
                                var type = firstChild.getAttribute("typeof");
                                if 
(/\bmw:(Transclusion|Extension)\b/.test(type)) {
@@ -2658,9 +2662,11 @@
                                                addDeltaToDSR(firstChild, 
tsrDelta);
                                        }
                                }
-                       } else {
-                               console.error( 'ERROR in ' + env.page.name + ': 
no DOMFragment wrapper dsr on ' + node.outerHTML );
                        }
+                       //else {
+                       //      console.error( 'ERROR in ' + env.page.name +
+                       //                      ': no DOMFragment wrapper dsr 
on ' + node.outerHTML );
+                       //}
 
                        // Move the old content nodes over from the dummyNode
                        while (firstChild) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibf826dd72e3576fba8a04fa91e931b8e4d7cae46
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Parsoid
Gerrit-Branch: master
Gerrit-Owner: GWicke <[email protected]>
Gerrit-Reviewer: GWicke <[email protected]>
Gerrit-Reviewer: jenkins-bot

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

Reply via email to