Re: [Wikitech-l] VisualEditor discards changes made in Wikitext editor

2017-02-21 Thread John P. New
Alex and James,

Thanks for the guidance. I've set up the RESTbase server and it's working well: 
wikitext editor changes are reflected in VE when switching (and vice versa).

John

On February 20, 2017 09:13:58 PM Alex Monk wrote:
> One of the things that should probably be noted is that, if I recall
> correctly, this was the feature that required the addition of the
> wgVisualEditorFullRestbaseURL configuration - previously there was just
> wgVisualEditorRestbaseURL. You'll need to set up RB and point that config
> var at it.
> 
> On 20 February 2017 at 21:02, John P. New  wrote:
> 
> > On February 20, 2017 08:34:35 PM James Forrester wrote:
> > > On Mon, 20 Feb 2017 at 10:42 John P. New  wrote:
> > >
> > > > I've set up MW 1.28 with VE/parsoid and everything is working well
> > > >
> > > > However, when I edit in (any) wikitext editor and try to switch to VE,
> > I
> > > > am presented with a dialog with only 2 choices: "Cancel" or "Discard my
> > > > changes and switch". Diving into the code I found I could change
> > > > ve.init.MWVESwitchConfirmDialog.js (line 58) from
> > > >   modes: [ 'restbase' ]
> > > > to
> > > >   modes: [ 'restbase', 'simple' ]
> > > >
> > > > that adds "Switch" to the dialog box, but when this option is chosen,
> > any
> > > > changes made in the wikitext editor are lost.
> > > >
> > > > Is this a mis-configuration on my part or is switching from edited
> > > > wikitext to VE not supported? Do I need a RESTbase server to implement
> > this
> > > > functionality?
> > > >
> > >
> > > RESTbase provides the switching-with-changes ability, yes. There's a
> > reason
> > > VE doesn't offer switching-with-changes without it. :-) In general,
> > > fiddling with the code inside an extension is always going to break.
> > >
> > > J.
> > >
> > Thanks for the clarification.
> >
> > Should this be noted in the setup instructions for Visual Editor? It would
> > have saved me a lot of head-scratching and investigation time.
> >
> > And yes, I realize messing with the code will break things, but it was my
> > way of finding out that I might need a RESTbase server and to point to
> > where my problem was. :-)
> >
> > John
> >
> >
> >
> > ___
> > Wikitech-l mailing list
> > Wikitech-l@lists.wikimedia.org
> > https://lists.wikimedia.org/mailman/listinfo/wikitech-l
> >
> ___
> Wikitech-l mailing list
> Wikitech-l@lists.wikimedia.org
> https://lists.wikimedia.org/mailman/listinfo/wikitech-l


___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Re: [Wikitech-l] VisualEditor discards changes made in Wikitext editor

2017-02-20 Thread Alex Monk
One of the things that should probably be noted is that, if I recall
correctly, this was the feature that required the addition of the
wgVisualEditorFullRestbaseURL configuration - previously there was just
wgVisualEditorRestbaseURL. You'll need to set up RB and point that config
var at it.

On 20 February 2017 at 21:02, John P. New  wrote:

> On February 20, 2017 08:34:35 PM James Forrester wrote:
> > On Mon, 20 Feb 2017 at 10:42 John P. New  wrote:
> >
> > > I've set up MW 1.28 with VE/parsoid and everything is working well
> > >
> > > However, when I edit in (any) wikitext editor and try to switch to VE,
> I
> > > am presented with a dialog with only 2 choices: "Cancel" or "Discard my
> > > changes and switch". Diving into the code I found I could change
> > > ve.init.MWVESwitchConfirmDialog.js (line 58) from
> > >   modes: [ 'restbase' ]
> > > to
> > >   modes: [ 'restbase', 'simple' ]
> > >
> > > that adds "Switch" to the dialog box, but when this option is chosen,
> any
> > > changes made in the wikitext editor are lost.
> > >
> > > Is this a mis-configuration on my part or is switching from edited
> > > wikitext to VE not supported? Do I need a RESTbase server to implement
> this
> > > functionality?
> > >
> >
> > RESTbase provides the switching-with-changes ability, yes. There's a
> reason
> > VE doesn't offer switching-with-changes without it. :-) In general,
> > fiddling with the code inside an extension is always going to break.
> >
> > J.
> >
> Thanks for the clarification.
>
> Should this be noted in the setup instructions for Visual Editor? It would
> have saved me a lot of head-scratching and investigation time.
>
> And yes, I realize messing with the code will break things, but it was my
> way of finding out that I might need a RESTbase server and to point to
> where my problem was. :-)
>
> John
>
>
>
> ___
> Wikitech-l mailing list
> Wikitech-l@lists.wikimedia.org
> https://lists.wikimedia.org/mailman/listinfo/wikitech-l
>
___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Re: [Wikitech-l] VisualEditor discards changes made in Wikitext editor

2017-02-20 Thread John P. New
On February 20, 2017 08:34:35 PM James Forrester wrote:
> On Mon, 20 Feb 2017 at 10:42 John P. New  wrote:
> 
> > I've set up MW 1.28 with VE/parsoid and everything is working well
> >
> > However, when I edit in (any) wikitext editor and try to switch to VE, I
> > am presented with a dialog with only 2 choices: "Cancel" or "Discard my
> > changes and switch". Diving into the code I found I could change
> > ve.init.MWVESwitchConfirmDialog.js (line 58) from
> >   modes: [ 'restbase' ]
> > to
> >   modes: [ 'restbase', 'simple' ]
> >
> > that adds "Switch" to the dialog box, but when this option is chosen, any
> > changes made in the wikitext editor are lost.
> >
> > Is this a mis-configuration on my part or is switching from edited
> > wikitext to VE not supported? Do I need a RESTbase server to implement this
> > functionality?
> >
> 
> RESTbase provides the switching-with-changes ability, yes. There's a reason
> VE doesn't offer switching-with-changes without it. :-) In general,
> fiddling with the code inside an extension is always going to break.
> 
> J.
> 
Thanks for the clarification.

Should this be noted in the setup instructions for Visual Editor? It would have 
saved me a lot of head-scratching and investigation time.

And yes, I realize messing with the code will break things, but it was my way 
of finding out that I might need a RESTbase server and to point to where my 
problem was. :-)

John



___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Re: [Wikitech-l] VisualEditor discards changes made in Wikitext editor

2017-02-20 Thread James Forrester
On Mon, 20 Feb 2017 at 10:42 John P. New  wrote:

> I've set up MW 1.28 with VE/parsoid and everything is working well
>
> However, when I edit in (any) wikitext editor and try to switch to VE, I
> am presented with a dialog with only 2 choices: "Cancel" or "Discard my
> changes and switch". Diving into the code I found I could change
> ve.init.MWVESwitchConfirmDialog.js (line 58) from
>   modes: [ 'restbase' ]
> to
>   modes: [ 'restbase', 'simple' ]
>
> that adds "Switch" to the dialog box, but when this option is chosen, any
> changes made in the wikitext editor are lost.
>
> Is this a mis-configuration on my part or is switching from edited
> wikitext to VE not supported? Do I need a RESTbase server to implement this
> functionality?
>

RESTbase provides the switching-with-changes ability, yes. There's a reason
VE doesn't offer switching-with-changes without it. :-) In general,
fiddling with the code inside an extension is always going to break.

J.

-- 

James D. Forrester
Lead Product Manager, Editing
Wikimedia Foundation, Inc.
jforrester at wikimedia.org
 |
@jdforrester
___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

[Wikitech-l] VisualEditor discards changes made in Wikitext editor

2017-02-20 Thread John P. New
I've set up MW 1.28 with VE/parsoid and everything is working well

However, when I edit in (any) wikitext editor and try to switch to VE, I am 
presented with a dialog with only 2 choices: "Cancel" or "Discard my changes 
and switch". Diving into the code I found I could change 
ve.init.MWVESwitchConfirmDialog.js (line 58) from
  modes: [ 'restbase' ]
to
  modes: [ 'restbase', 'simple' ]

that adds "Switch" to the dialog box, but when this option is chosen, any 
changes made in the wikitext editor are lost.

Is this a mis-configuration on my part or is switching from edited wikitext to 
VE not supported? Do I need a RESTbase server to implement this functionality?


___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l