Page MenuHomePhabricator

Visual Editor greys Publish Changes during the exit, unable to save changes
Closed, DuplicatePublic

Description

I cannot put my finger on what triggers this, but for the past few days, I have had numerous occasions where mid-edit I notice that the Publish Changes is grey and not blue. This means I cannot save my edit and I have to exit and repeat the edit, which is very frustrating. Sometimes it happens even in a very simple edit. This edit shows what I was trying to do -- just add a few words. But the first time I attempted it, when I went to Publish Changes, it was greyed and I had to abort and repeat. The second time it worked normally.

https://en.wikipedia.org/w/index.php?title=Sunnybank%2C_Queensland&type=revision&diff=870213582&oldid=870213422

I can't see any common factor in the kind of editing I was doing. But it's something that has changed within the last week. I don't recall encountering this before. I delayed reporting it because I was trying to work out what triggered it, but I gave up when I had it occur on the simple edit above.

Event Timeline

The problem persists. I have learned that once it reaches the greyed state, it is not possible to undo (consistent I guess with thinking no changes have been made, despite changes being visible).

I am editing Cornubia, Queensland on English Wikipedia. This is the [https://en.wikipedia.org/w/index.php?title=Cornubia,_Queensland&oldid=870451850 current version]. I added 3 templates at the top of the file (Use Australian English, Use DMY dates, more citations needed). Then I noticed that the Publish Changes was grey. Here is a screenshot. This article has not previously contained those templates. Yet look at my screenshot, you can see the 3 templates I have added. You can see the Publish Changes is greyed. However, I can undo the work I have done and redo it. I can do more edits. However, whatever I do, Publish Changes remains grey throughout all of this and clicking it does nothing.

Capture.JPG (1×3 px, 396 KB)

The problem persists. And I still cannot see any pattern to what is causing it. It does not appear to be a reaction to any specific editor action.

However, I have learned a few things about it. Once the bug has struck, I started trying to save the edits I have made (as they are sitting there in the browser and I obviously didn't want to repeat all the work), I have taken to coping the contents of the buffer so I can replace the buffer when I reopen the article. That introduces some new problems. On pasting over the existing article when re-opening the article, infobox is presented horizontally (newlines are stripped out) and some named citations are renamed (the number "2" being appended to their names). This of course breaks any citation reuse (as the reuse uses the original name). So copy-and-paste isn't a winning work-around (it is VERY tedious to replace all the newlines in the infobox in particular). It am not sure if this is part of the overall bug, or a second separate copy-and-paste bug.

Today it dawned on me that there might be a new workaround, switch to Source Editing. Yeah, it worked, the source editor starts (after quite a pause -- is there something difficult for it to figure out?) and contains my current work (which I hastily save). So I do at least have a workaround now. But please fix this maddening bug. It's happening again and again and again. I feel it must have been introduced by some code change in the past week or so, as I am a regular VE user and this is a problem that you cannot fail to notice.

@Kerry_Raymond Thanks for reporting this. This might be the same issue as T209542 – apparently this happens after you save an edit in VE, then open VE again without refreshing (or leaving) the page. Does this match the problem you see?

Yes, it could be the same. I use multiple tabs on my browser, one tab will always be the article I am working on, the others will be sources etc. So yes after each Publish Changes in VE, the next action I am very likely to make in that tab is to launch the VE on that same article. If this is correct, the problem would occur on every 2nd edit. I don't think it is that frequent. But I realise that lately I have mostly been creating new articles on Australian places which means construction a large infobox (Template:Infobox Australian place). As doing lots of template work isn't a particular strength in the VE, I often do those edits in source editor from the outset or switch mid-edit from VE to source. So that probably means I am not doing two successive VE-only edits as frequently as usual, so that might reduce the frequency of the bug to what I am experience (frequent but not 1 in 2).

It would explain why I could never reproduce the bug. Before I figured out that I could switch to Source Edit, I would abandon the edit by clicking "Read". I guess that reloads the article and then, when I attempt to reproduce the error by doing the same edits again, it always worked correctly, which delayed my reporting it. Nothing worse than a non-reproducible bug report.

However, I am pretty sure that the Publish Changes does go blue for a while before going grey. I think I would notice it being grey sooner if never went blue in the first place (I am sure the change catches my eye at times). Anyhow, aimed with this new theory, I will try to be more alert to those circumstances.

And I probably should add that having one tab where I do nothing but repeated edits to the articles I am currently working on is my normal way of working. Because I start a lot of new articles, I get lots of problems with new page patrollers (or those with nothing better to do) causing edit conflicts so I tend to do lots of small edits to minimise the risk. As my way of working hasn't changed recently, this bug (irrespective of the cause) has been introduced due to some change in the past week or so. I could not have failed to notice it before. So look to changes in the past 1-2 weeks.

I found the cause and wrote a patch. Hopefully we can deploy the fix tomorrow. The issue was introduced in a change that was deployed to Wikipedia on 15 November.

Apparently it occurs not when reloading VE without refreshing the page, as I initially suspected, but instead when you open VE very quickly after an edit to the page is saved (within a few seconds; it doesn't matter how it's saved or who saves it).

I'll merge this into T209542. Thanks for your responses!