-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Post Editor: Autosaves are no longer saving a revision #20265
Comments
@mcsf @mtias In the context of Gutenberg, will there be built-in revisions? Or will it tie into core functionality related to Calypso via an API? One concrete example we need to tackle is real-time editing, where the client maintains state and pushes-pulls changes from the server via an API. Based on certain conditions, we'd love to be able to intelligently push client-side auto-saves to the server — which core WP doesn't currently support. Knowing what's coming for Gutenberg will help Delta / Samus prioritize work on post revisions in Calypso. Thanks! |
An additional data point: I edited a draft started by a colleague, but my changes didn't show up for me as a revision in the history. They appeared "saved." They showed up in preview. They show up now that the original author has published it. And now that it's published, they even show up in the revision log / history — under the original author's name, and timestamped to when he published it. |
@lancewillett we are not touching the revisions interface directly. There are issues with the API and how it handles revisions, as right now it is creating a lot. Ideally core knows what should be a revision and what should not be, and the client doesn't have to handle that. |
The behavior was recently changed server-side defining the autosave constant, which is checked as a condition for aborting the creation of a new revision: r165508-wpcom |
Also noting that, as described, this is "working as intended" so far as how core has traditionally treated autosaves. The previous Calypso behavior of autosave was effectively the same as a "full" save, at least for drafts, revision and all. For WordPress.com, it's been fine enough, since it can be occasionally handy to persist frequent revisions, and we're more okay with the data requirement hit. Ideally there's some middle-ground where the server is smart enough to combine multiple changesets made within a short timeframe, or more efficiently store diffs between two states of post. See also: WordPress/gutenberg#3656 |
I'm having trouble finding it, but excessive revisions was a known issue/problem from the Jetpack side when using Calypso. When using Calypso, you could easily rack up hundreds of revisions for a single post, each one having only a few words changed, but with no easy way to filter them out. One idea I had was add meta data to the auto-saved revisions that were saved so they would be automatically dropped after X number or drop any older than Y when the post was saved, so we could still keep the latest few autosaves in the end of a diaster, but not kill a db. |
Definitely -- the number of draft autosaves we were seeing in revisions were borderline problematic on non-jetpack sites as well (in terms of UX)
Clever. Although, old revisions are cycled out as the limit is hit, so this might be kind of moot. Something else we've talked about for a quick workaround is to trigger a call to create a revision on a significantly longer debounce timeout so we don't accrue so many revisions. This might be a happy medium -- at least on draft content where the |
True. Core doesn't impose a limit, so Jetpack sites potentially could have a metric ton of revisions. WP.com looks to cap it at 25 for non blue/VIP flagged sites. |
Hi there! Is this being addressed? I have been getting some users on LC complaining about their changes not being saved even though it shows as saved and also not showing on their history so they can't go back to previous versions. I have just done a test myself to one the users (interstrates CHAT 1282963-hc |
This is the best solution, in my opinion — we want to avoid sending each character change as a revision. There are more elegant ways to solve it, but I think we should focus on other work. |
This issue may be the cause for 1027324-zen - user reported their content was lost while writing and he can't access the history. |
I think 1978240-chat may be another case of this, but I'm not certain. |
I have a user who swears they have worked on a post “all night” but there are no revisions in the post in calypso (post is saved as a draft currently). The post is currently blank. Do we perhaps not save revisions on drafts? I didn’t think this was the case, and there are no mentions we don’t here. Is this related to this issue? |
I have a user who was working on a post (which is saved as a draft) and the next day found that half their content had disappeared with no revisions available. User saved the post not only by the autosave feature but confirmed that they have also clicked "Save" as well throughout the building of their content. I'm thinking this is related to this issue but want to double check. |
We have what appears to be a related report in 1235098-zen. Here is the initial issue:
The user and HE troubleshooted by checking alternate browsers, clearing browser cache, and checking browser extensions. These didn't appear to resolve the issue. The user's subsequent testing seems to point to an autosave issue. Steps to reproduceThe user did some testing for us in order to reproduce the issue:
There is a video in the ticket (I haven't included the video here because it may contain personal information). What I expectedThe autosave feature should preserve edits to a Post or Page, leaving the published version accessible through it's link, while retaining saved updates for further review and publication through the Revision History. What happened insteadLeaving the Page open in the editor for 15 minutes, then returning to the editor to save the Page, results in the Page becoming inaccessible using it's URL. Browser / OS versionGoogle Chrome and Internet Explorer on Windows. The user mentioned that when they tested the specific page link in Safari on their Mac and iPhone, the link worked. |
I think this might have happened in #1279237-zen. User had a very long post that they worked on one day, but we have no revisions saved from that day, only revisions from several days before and several days after. |
Several more reports that appear to be about the same issue in p2EDhh-tH-p2 |
13978631-hc Content lost when adding an image. No |
Content lost when adding an image as well. No history. Using Chrome. 14033108-hc |
Another report in 2175757-Zen. In this case, the user mentioned seeing it Also, no |
Another one, 199847-hc This user also reported that they saw the post |
Fix for Simple sites was deployed to WP.com earlier today in D30389-code. If an autosave is significantly different from a previous one that is going to be overwritten, we create a permanent post revision from that autosave. Normally, revisions are not created for autosaves. Now, if a user finds out she lost her post content, she can open the Post Revisions dialog and the lost content should be there as one of the last revisions. More patches will be needed to deploy this fix for Atomic and Jetpack sites, too. I'll post updates as we proceed. |
User just provided a screencast of the issue. https://trendings616160297.blog/screen-recording-2019-07-23-at-1-41-52-am-mov/ 2199399-zen (Atomic site) |
Another report of a page not auto-saving. They lost 40-minutes of work: 14316373-hc (WordPress.com Premium) Update from Sheri: User description of the problem:
Based on the user's description of the problem in this case, it sounds they opened a page for editing while logged in as one account then logged out of WordPress.com and back in as a different account (or maybe they just got logged out somehow?) and then tried to edit the draft they previously started. I am not sure how else to interpret their explanation because the 'you are not allowed to edit this post' message should only appear if the currently logged in user doesn't have sufficient rights to edit the page. I also noticed that the a revision was saved for that user's page (blog_id 152521822, page_id 402, revision 403) when they created it on 29 Jul @ 18:29 and the revision showing the initial save had a title of "Auto Draft" and the content was completely empty. |
Another report here: 14334065-hc (WordPress.com Premium plan simple site) They saw it autosaving but came back to the post and their changes were no longer there. There are Post Revisions on the post but they are older, which I assume means the post was published and then changed to a draft while they made edits. |
@eoinsav can you please note the type of site when you add notes about new reports? And a quick user quote explaining the problem if you've got anything quotable/helpful! |
@eoinsav @designsimply There are several important details that are helpful when debugging autosave issues:
|
Another report:
User info:
Also:
|
reported in #6127572-hc WordPress.com simple site, Personal plan They started a draft on 8/29 and worked on it for an hour or two, letting it auto-save the whole time. They say the auto-saving was visibly happening, so they never tried to manually save it. The post was all text only (paragraph blocks). There are no revisions saved, not even the title of the post. It doesn't appear in the activity log and there's no record of a deleted post. "I had written a post this last Thursday 8/29 titled Saturn Return, it said it autosaved but now it is nowhere to be found..not in drafts or trash, is there anyway to restore it - please help!" - user quote |
Another user reported the issue: #2387674-zen |
@galakhyati can you add a bit more detail for the case you reported?
|
Have a user with missing revisions: 2411956-zen
|
Happychat: 16340669-hc is the site Simple, Atomic or Jetpack? Simple. which editor exactly was used? Block editor in Calypso. when the content was lost (that can happen for variety of reasons), is there a permanent revision (or several of them) that has been saved during the edit? There is no sign of that post in the drafts or anything at all. No Activity log message. Totally vanished. |
Another report: Ticket: 2470571-zen User info:
I also tried to test the autosave and it didn't work at all for me. Even after I clicked "Save Draft", the autosave didn't seem to trigger. 🤔 |
Extra info:
|
This thread contains references to all three editors (Calypso - the OP, Gutenberg, and Classic); I think we'll need to split these out to separate issues, since they handle revisions differently, and this issue is becoming a bit of a dumping ground for any revision issues. |
For folks that are assigned to this, please close out this issue in favor of a milestone or project that captures problems noted in this long thread. Note that this will likely require an audit before we can create actionable issues. Many of the reports here are based on content loss symptoms, which may involve many bugs/flows to resolve. Once a project/milestone is created, we can help prioritize and get folks assigned to tasks. See also p7jreA-1y8-p2 for tips on how to approach this or DM me if folks had questions. |
The Calypso editor is in the process of being deprecated. I'm going to close out this issue. |
I'm not 100% sure, but my gut says that something changed relatively recently in the way we handle revisions for post (and page) drafts when the editor performs and "autosave."
@designsimply & I both seem to recall that, until recently, the Calypso editor deviated from core WordPress behavior in that "Autosaves" to drafts resulted in revisions being saved (they're explicitly blocked from doing so in core).
When I look back through moderately old posts and pages, the revisions seem to corroborate our gut feelings. There's also this from the WPCOM support docs:
This is maybe related to the change in #19261: passing the
autosave
param to the API call results in theDOING_AUTOSAVE
constant getting set. /cc @roccotripaldiIt defintely seems like the correct semantics to set this constant for these calls -- we are, after all, doing an autosave. This becomes a bit problematic, however, in the case of co-editing a draft (see steps to reproduce below for why).
My question here is, should we patch core somehow to allow us to save revisions for autosaves as before?
By not doing so, could subsequent changes by other users could result in an inconsistent content state and / or data loss?
Steps to reproduce
Save
button changes toSaved
)Save
before the autosave feature kicks in (do this a few times for good measure)What I expected
Saved
Saved
)What happened instead
Context / Source
#dogfooding #anxiety #painpoint.
The text was updated successfully, but these errors were encountered: