Hi all,
I am trying to set up the Visual Editor on out CentOS 6.6 system running MediaWiki 1.24.1 installation. I have successfully set up Parsoid on a stand-along Ubuntu Trusty node (it works and retrieves/parses Wiki pages), and ensured that it works; I then checked out the Visual Editor extension (branch REL1_24) and its submodule, and configured them in LocalSettings.php:
require_once( "{$IP}/extensions/VisualEditor/VisualEditor.php" ); $wgDefaultUserOptions['visualeditor-enable'] = 1; $wgHiddenPrefs[] = 'visualeditor-enable'; $wgVisualEditorParsoidURL = 'http://vdanilchenko-compute.vistaprint.net:8142'; $wgVisualEditorParsoidPrefix = 'corewiki';
I am testing it in the latest Chrome. When I view a page and click on the ‘Edit’ button, the system redirects to the ‘?veaction=edit’ link, thinks for a little while, shows the blue progress bar -- and then produced this error in the console (call stack included):
ve.ce.BranchNode.js:234 Uncaught NotFoundError: Failed to execute 'insertBefore' on 'Node': The node before which the new node is to be inserted is not a child of this node. ve.ce.BranchNode.js:234 ve.ce.BranchNode.setupSlugs ve.ce.ContentBranchNode.js:248 ve.ce.ContentBranchNode.renderContents ve.ce.ContentBranchNode.js:110 ve.ce.ContentBranchNode.onSplice ve.ce.BranchNode.js:35 VeCeBranchNode ve.ce.ContentBranchNode.js:20 VeCeContentBranchNode ve.ce.ParagraphNode.js:18 VeCeParagraphNode oojs.jquery.js:868 oo.Factory.create ve.ce.BranchNode.js:168 ve.ce.BranchNode.onSplice ve.ce.BranchNode.js:35 VeCeBranchNode ve.ce.DivNode.js:18 VeCeDivNode oojs.jquery.js:868 oo.Factory.create ve.ce.BranchNode.js:168 ve.ce.BranchNode.onSplice ve.ce.BranchNode.js:35 VeCeBranchNode ve.ce.DocumentNode.js:19 VeCeDocumentNode ve.ce.Document.js:19 VeCeDocument ve.ce.Surface.js:30 VeCeSurface ve.ui.Surface.js:43 VeUiSurface ve.ui.DesktopSurface.js:20 VeUiDesktopSurface ve.init.Target.js:185 ve.init.Target.createSurface ve.init.mw.Target.js:1325 (anonymous function)
This seems to refer to the error in the following code section in VisualEditor/lib/ve/src/ce/ve.ce.BranchNode.js:
for ( i in this.getModel().slugPositions ) { slugNode = doc.importNode( slugTemplate, true ); if ( this.children[i] ) { this.$element[0].insertBefore( slugNode, this.children[i].$element[0] ); } else { this.$element[0].appendChild( slugNode ); } this.slugNodes[i] = slugNode; }
So I tried dumping the nodes involved – this.$element[0] and slugNode – to the console (immediately preceding the error message of course), and got the following:
0th child: <p><span class="hideshow1 ve-ce-textStyleAnnotation ve-ce-spanAnnotation"><span class="" id="hidemetextWTRaSupplierDocsZ" about="#mwt7" typeof="mw:Transclusion" data-parsoid="{“stx”:”html”,”dsr”:[2025,2111,null,null],”pi”:[[{“k”:”hide id”,”named”:true,”spc”:[““,”“,”“,”“]},{“k”:”text id”,”named”:true,”spc”:[““,”“,”“,”“]}]]}" data-mw="{“parts”:[{“template”:{“target”:{“wt”:”Collapsible js”,”href”:”./Template:Collapsible_js”},”params”:{“hide id”:{“wt”:”hidemeWTRaSupplierDocsZ”},”text id”:{“wt”:”hidemetextWTRaSupplierDocsZ”}},”i”:0}}]}">show</span><span data-parsoid="{“src”:”<javascript>\n(function($){\n// $('#hidemeWTRaSupplierDocsZ').css('display','none');\n$('#hidemetextWTRaSupplierDocsZ').text('show').click(function() {\n $('#hidemeWTRaSupplierDocsZ').slideToggle('fast', function(){\n\n if ($('#hidemeWTRaSupplierDocsZ').is(':hidden')) {\n $('#hidemetextWTRaSupplierDocsZ').text('show');\n } else {\n $('#hidemetextWTRaSupplierDocsZ').text('hide');\n }\n\n });\n})\n})(window.jQuery);\n</javascript>“}" typeof="mw:Extension/javascript" data-mw="{“name”:”javascript”,”attrs”:{},”body”:{“extsrc”:”\n(function($){\n// $('#hidemeWTRaSupplierDocsZ').css('display','none');\n$('#hidemetextWTRaSupplierDocsZ').text('show').click(function() {\n $('#hidemeWTRaSupplierDocsZ').slideToggle('fast', function(){\n\n if ($('#hidemeWTRaSupplierDocsZ').is(':hidden')) {\n $('#hidemetextWTRaSupplierDocsZ').text('show');\n } else {\n $('#hidemetextWTRaSupplierDocsZ').text('hide');\n }\n\n });\n})\n})(window.jQuery);\n”}}" about="#mwt7"> </span></span><b class="ve-ce-textStyleAnnotation ve-ce-boldAnnotation">WTR and Supplier Documents</b></p>
Slug: <span class="ve-ce-branchNode-slug ve-ce-branchNode-inlineSlug"></span>
Aaaand at this point, I am stuck. These seem to be the DOM nodes dynamically generated by the Visual Editor, and I have no idea where to go from here.
I am getting this with all the extensions disabled. It happens whether client debugger and resource loader debug mode are on or off.
Does anyone have any ideas on what might be going wrong?
Thanks!
Does anyone have some ideas about why the VisualEditor is failing on JS level for us?
Please?..
Thanks in advance.
From: mediawiki-l-bounces@lists.wikimedia.org [mailto:mediawiki-l-bounces@lists.wikimedia.org] On Behalf Of Victor Danilchenko Sent: Thursday, March 26, 2015 11:45 AM To: MediaWiki announcements and site admin list Subject: [MediaWiki-l] Need help with VisualEditor under MediaWiki 1.24.1
Hi all,
I am trying to set up the Visual Editor on out CentOS 6.6 system running MediaWiki 1.24.1 installation. I have successfully set up Parsoid on a stand-along Ubuntu Trusty node (it works and retrieves/parses Wiki pages), and ensured that it works; I then checked out the Visual Editor extension (branch REL1_24) and its submodule, and configured them in LocalSettings.php:
require_once( "{$IP}/extensions/VisualEditor/VisualEditor.php" ); $wgDefaultUserOptions['visualeditor-enable'] = 1; $wgHiddenPrefs[] = 'visualeditor-enable'; $wgVisualEditorParsoidURL = 'http://vdanilchenko-compute.vistaprint.net:8142'; $wgVisualEditorParsoidPrefix = 'corewiki';
I am testing it in the latest Chrome. When I view a page and click on the ‘Edit’ button, the system redirects to the ‘?veaction=edit’ link, thinks for a little while, shows the blue progress bar -- and then produced this error in the console (call stack included):
ve.ce.BranchNode.js:234 Uncaught NotFoundError: Failed to execute 'insertBefore' on 'Node': The node before which the new node is to be inserted is not a child of this node. ve.ce.BranchNode.js:234 ve.ce.BranchNode.setupSlugs ve.ce.ContentBranchNode.js:248 ve.ce.ContentBranchNode.renderContents ve.ce.ContentBranchNode.js:110 ve.ce.ContentBranchNode.onSplice ve.ce.BranchNode.js:35 VeCeBranchNode ve.ce.ContentBranchNode.js:20 VeCeContentBranchNode ve.ce.ParagraphNode.js:18 VeCeParagraphNode oojs.jquery.js:868 oo.Factory.create ve.ce.BranchNode.js:168 ve.ce.BranchNode.onSplice ve.ce.BranchNode.js:35 VeCeBranchNode ve.ce.DivNode.js:18 VeCeDivNode oojs.jquery.js:868 oo.Factory.create ve.ce.BranchNode.js:168 ve.ce.BranchNode.onSplice ve.ce.BranchNode.js:35 VeCeBranchNode ve.ce.DocumentNode.js:19 VeCeDocumentNode ve.ce.Document.js:19 VeCeDocument ve.ce.Surface.js:30 VeCeSurface ve.ui.Surface.js:43 VeUiSurface ve.ui.DesktopSurface.js:20 VeUiDesktopSurface ve.init.Target.js:185 ve.init.Target.createSurface ve.init.mw.Target.js:1325 (anonymous function)
This seems to refer to the error in the following code section in VisualEditor/lib/ve/src/ce/ve.ce.BranchNode.js:
for ( i in this.getModel().slugPositions ) { slugNode = doc.importNode( slugTemplate, true ); if ( this.children[i] ) { this.$element[0].insertBefore( slugNode, this.children[i].$element[0] ); } else { this.$element[0].appendChild( slugNode ); } this.slugNodes[i] = slugNode; }
So I tried dumping the nodes involved – this.$element[0] and slugNode – to the console (immediately preceding the error message of course), and got the following:
0th child: <p><span class="hideshow1 ve-ce-textStyleAnnotation ve-ce-spanAnnotation"><span class="" id="hidemetextWTRaSupplierDocsZ" about="#mwt7" typeof="mw:Transclusion" data-parsoid="{“stx”:”html”,”dsr”:[2025,2111,null,null],”pi”:[[{“k”:”hide id”,”named”:true,”spc”:[““,”“,”“,”“]},{“k”:”text id”,”named”:true,”spc”:[““,”“,”“,”“]}]]}" data-mw="{“parts”:[{“template”:{“target”:{“wt”:”Collapsible js”,”href”:”./Template:Collapsible_js”},”params”:{“hide id”:{“wt”:”hidemeWTRaSupplierDocsZ”},”text id”:{“wt”:”hidemetextWTRaSupplierDocsZ”}},”i”:0}}]}">show</span><span data-parsoid="{“src”:”<javascript>\n(function($){\n// $('#hidemeWTRaSupplierDocsZ').css('display','none');\n$('#hidemetextWTRaSupplierDocsZ').text('show').click(function() {\n $('#hidemeWTRaSupplierDocsZ').slideToggle('fast', function(){\n\n if ($('#hidemeWTRaSupplierDocsZ').is(':hidden')) {\n $('#hidemetextWTRaSupplierDocsZ').text('show');\n } else {\n $('#hidemetextWTRaSupplierDocsZ').text('hide');\n }\n\n });\n})\n})(window.jQuery);\n</javascript>“}" typeof="mw:Extension/javascript" data-mw="{“name”:”javascript”,”attrs”:{},”body”:{“extsrc”:”\n(function($){\n// $('#hidemeWTRaSupplierDocsZ').css('display','none');\n$('#hidemetextWTRaSupplierDocsZ').text('show').click(function() {\n $('#hidemeWTRaSupplierDocsZ').slideToggle('fast', function(){\n\n if ($('#hidemeWTRaSupplierDocsZ').is(':hidden')) {\n $('#hidemetextWTRaSupplierDocsZ').text('show');\n } else {\n $('#hidemetextWTRaSupplierDocsZ').text('hide');\n }\n\n });\n})\n})(window.jQuery);\n”}}" about="#mwt7"> </span></span><b class="ve-ce-textStyleAnnotation ve-ce-boldAnnotation">WTR and Supplier Documents</b></p>
Slug: <span class="ve-ce-branchNode-slug ve-ce-branchNode-inlineSlug"></span>
Aaaand at this point, I am stuck. These seem to be the DOM nodes dynamically generated by the Visual Editor, and I have no idea where to go from here.
I am getting this with all the extensions disabled. It happens whether client debugger and resource loader debug mode are on or off.
Does anyone have any ideas on what might be going wrong?
Thanks!
_______________________________________________ MediaWiki-l mailing list To unsubscribe, go to: https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Hi,
It looks like this is a bug that was fixed in b3b3b11960962e9c08c709df77b3197d8cf72ee3 (https://gerrit.wikimedia.org/r/#/c/163636/ / https://phabricator.wikimedia.org/T73418).
Unfortunately the older branches of VisualEditor are not really maintained; it is still beta software. But it seems like the patch cherry-picks cleanly on REL1_24 (although I haven't tested it):
(assuming you're in mediawiki/extensions/VisualEditor repository root) git checkout REL1_24 git submodule update cd lib/ve git cherry-pick b3b3b11960962e9c08c709df77b3197d8cf72ee3 cd ../.. git commit -am "LOCAL HACK: Cherry-pick fix for T73418"
Yup, that was it, thanks a million! I figured it were a bug, but I had no idea what to search for in terms of a fix.
BTW, Can you think of any other fixes I should backport into 1.24 VisualEditor?
From: mediawiki-l-bounces@lists.wikimedia.org [mailto:mediawiki-l-bounces@lists.wikimedia.org] On Behalf Of Bartosz Dziewonski Sent: Tuesday, March 31, 2015 5:51 PM To: MediaWiki announcements and site admin list Subject: Re: [MediaWiki-l] Need help with VisualEditor under MediaWiki 1.24.1
Hi,
It looks like this is a bug that was fixed in b3b3b11960962e9c08c709df77b3197d8cf72ee3 (https://gerrit.wikimedia.org/r/#/c/163636/https://gerrit.wikimedia.org/r/#/c/163636/ / https://phabricator.wikimedia.org/T73418)https://phabricator.wikimedia.org/T73418).
Unfortunately the older branches of VisualEditor are not really maintained; it is still beta software. But it seems like the patch cherry-picks cleanly on REL1_24 (although I haven't tested it):
(assuming you're in mediawiki/extensions/VisualEditor repository root) git checkout REL1_24 git submodule update cd lib/ve git cherry-pick b3b3b11960962e9c08c709df77b3197d8cf72ee3 cd ../.. git commit -am "LOCAL HACK: Cherry-pick fix for T73418"
-- Bartosz Dziewoński
_______________________________________________ MediaWiki-l mailing list To unsubscribe, go to: https://lists.wikimedia.org/mailman/listinfo/mediawiki-lhttps://lists.wikimedia.org/mailman/listinfo/mediawiki-l
On 1 April 2015 at 10:19, Victor Danilchenko vdanilchenko@cimpress.com wrote:
Yup, that was it, thanks a million! I figured it were a bug, but I had no idea what to search for in terms of a fix.
BTW, Can you think of any other fixes I should backport into 1.24 VisualEditor?
We move pretty seriously quickly, I'm afraid; since the 1.24 release was cut we've had over 1400 changes, excluding i18n and OOjs UI/OOjs/UnicodeJS (library) changes: https://phabricator.wikimedia.org/P469%E2%80%8B with another 500 in OOjs UI.
This includes for instance table editing https://phabricator.wikimedia.org/P469$344 and helper tools for [[ and {{ https://phabricator.wikimedia.org/P469$715 and lots of other exciting stuff.
Starting to backport things would probably make it hard to know when to stop, I'm afraid. On the other hand, REL1_25 is coming very soon!
J.
Good to know. Sounds like we should aim for the 1.25 release then. Thanks.
Do you have some idea of approximately what ‘soon’ means in this context? A few weeks? A couple of months?
From: mediawiki-l-bounces@lists.wikimedia.org [mailto:mediawiki-l-bounces@lists.wikimedia.org] On Behalf Of James Forrester Sent: Wednesday, April 1, 2015 9:41 PM To: MediaWiki announcements and site admin list Subject: Re: [MediaWiki-l] Need help with VisualEditor under MediaWiki 1.24.1
On 1 April 2015 at 10:19, Victor Danilchenko <vdanilchenko@cimpress.commailto:vdanilchenko@cimpress.com> wrote:
Yup, that was it, thanks a million! I figured it were a bug, but I had no idea what to search for in terms of a fix.
BTW, Can you think of any other fixes I should backport into 1.24 VisualEditor?
We move pretty seriously quickly, I'm afraid; since the 1.24 release was cut we've had over 1400 changes, excluding i18n and OOjs UI/OOjs/UnicodeJS (library) changes: https://phabricator.wikimedia.org/P469https://phabricator.wikimedia.org/P469 with another 500 in OOjs UI.
This includes for instance table editing https://phabricator.wikimedia.org/P469$344https://phabricator.wikimedia.org/P469$344 and helper tools for [[ and {{ https://phabricator.wikimedia.org/P469$715https://phabricator.wikimedia.org/P469$715 and lots of other exciting stuff.
Starting to backport things would probably make it hard to know when to stop, I'm afraid. On the other hand, REL1_25 is coming very soon!
J. -- James D. Forrester Product Manager, Editing Wikimedia Foundation, Inc.
jforrester@wikimedia.orgmailto:jforrester@wikimedia.org | @jdforrester _______________________________________________ MediaWiki-l mailing list To unsubscribe, go to: https://lists.wikimedia.org/mailman/listinfo/mediawiki-lhttps://lists.wikimedia.org/mailman/listinfo/mediawiki-l
On Thu, 02 Apr 2015 12:48:43 +0200, Victor Danilchenko vdanilchenko@cimpress.com wrote:
Good to know. Sounds like we should aim for the 1.25 release then. Thanks.
Do you have some idea of approximately what ‘soon’ means in this context? A few weeks? A couple of months?
From https://www.mediawiki.org/wiki/MediaWiki_1.25:
"The 1.25.0 stable release is expected to come out on Wednesday, May 25, 2015."
…May 25 is actually a Monday. Hrmph.
<quote name="Bartosz Dz." date="2015-04-02" time="13:52:34 +0200">
On Thu, 02 Apr 2015 12:48:43 +0200, Victor Danilchenko vdanilchenko@cimpress.com wrote:
Good to know. Sounds like we should aim for the 1.25 release then. Thanks.
Do you have some idea of approximately what ‘soon’ means in this context? A few weeks? A couple of months?
From https://www.mediawiki.org/wiki/MediaWiki_1.25:
"The 1.25.0 stable release is expected to come out on Wednesday, May 25, 2015."
…May 25 is actually a Monday. Hrmph.
I just changed that from the 27th because: 1) Monday May 25th is the last day of the Hackathon, which will allow us to sprint on it while there together for last minute things. 2) The point person for the release will be going on vacation after the hackathon (starting on the 26th).
Why such an aversion to Monday?
Greg
mediawiki-l@lists.wikimedia.org