Entire content of text document disappeared while working on it

I was typing a txt document in Scrivener 3.1.3 on a Mac running Catalina 10.15.7.

I had about 1,000 words done, when suddenly the entire text disappeared. The project is still there. The txt document is still there, as are all other documents in the project, but the current one is blank as if I had titled it but not written any of the body.

The backup has the document there, but it is blank also. I can’t figure out what might have happened to the auto-save. I am absolutely positive that I did nothing to delete the text. I switched away to a browser to verify something, and when I returned, the document was blank. I had been working on the document for a couple hours, so there should have been plenty of auto-saves somewhere unless Scrivener did another auto-save after the text disappeared.

What might have caused this, and where might the autosave be, if not in the original project? There are no snapshots, either.

Thanks.

If the txt document is there, but the current one isn’t, what are we actually talking about?

It’s often a lot easier to solve problems in a Zoom session:

Zoom me

Thanks for the quick response.

The document is there in the Binder with its title. But when I click the document’s title in the Binder to open it, the document in the editor panel is entirely blank except for the title in the top bar of the editor above the ruler. The nearly 1,000 words of text that made up the actual body of the document is gone - blank, as if I hadn’t even begun writing it.

The fact that it disappeared while writing, and is blank in a backup as well, makes me wonder if there is some broken formatting in the file that is causing it to not display. Normally, even if for some reason a file is deleted from the disk while you’re working on it (say you use cloud sync in a share folder and someone else deletes it accidentally), it wouldn’t vanish because it doesn’t read from the disk constantly while you write—it loads it once into memory, and from that point on the version in the running software is the master copy. The disk is only used to save your changes when you pause.

Try this:

  1. Hold down the Shift and Cmd keys and right-click on the item in the binder.

  2. Select “Reveal in Finder” from the contextual menu.

    You should see a “content.rtf” file here. Hold down Option and drag it to your desktop, releasing Option once you have dropped it. This will create a copy.

  3. Now open TextEdit and open this file from the desktop in it. Do you see anything there? I’d guess not, since TextEdit is pretty much the same editor as Scrivener, but it’s a test.

  4. Close it, and go into TextEdit preferences, and in the “Open and Save” tab, set Display RTF files as RTF code instead of formatted text.

  5. Open the file again.

If there is content but it is broken, you should see everything here, though of course it will be a bit messy because you can see all of the formatting codes.

Either way, if it opens normally or only opens in “code view”, send us a copy of the file to tech support, so we can take a look at it and hopefully fix it for you.

If it is actually empty though, don’t bother. In that case you’d just want to go further in your backups.

Oh, and don’t forget to turn the RTF setting back off in TextEdit. :slight_smile:

2 Likes

I followed your instructions and found the text of the document. I emailed it to support and copied the text to a different file so I can paste it into a new document. Thank you for your help.

Thanks, I got the file you sent. So going off of your macOS version info on the forum, I tested this in macOS 10.15 by creating a new project and dropping the content file into the project while it was closed, so as to avoid any potential issues with import/export inadvertently “fixing” the file. For me, the text shows up just fine though. One thing I noticed is that your version of Scrivener as reported here is a bit old (3.1.3), so you might want to upgrade in any case. It could be what you saw in a bug that has been fixed already, which is why I’m not seeing the same thing.

Thanks for the info. As I said in my previous post, when I found the “missing” text (after following your instructions to find it), I copied it and pasted it as a straight txt file into a new TextEdit file.

I pasted the text of the article back into a new document in the same Scrivener project. It is all there and seemingly without issues.

I try to keep Scrivener up to date, but hadn’t noticed that there was a newer version available. I will update it right away.

Sounds good! I only mentioned updating to avoid it potentially happening again, whatever happened. Glad to hear you got everything brought back in without issues.

The same thing is happening again, but this time when I look at the blank ones in the Binder, there is no content file in the folder. This has happened with four documents that I wrote within the past week. I wrote the articles in Scrivener and copied them into WordPress for my website. I am absolutely positive I did not delete the content of the documents.

I have checked three backups. There are folders for the missing documents, but they are all missing content.rtf files there as well.

I don’t know if this had anything to do with it because I did not notice it until today. But yesterday I created a few other documents that are blank except for the title. Those are basically just potential articles which I will go back to and complete later. In the binder, these intentionally blank documents immediately follow those that had content in them, but are now blank.

When I open the project .scriv to see the package contents, I see today’s date for opening the project, but the latest date for any document being modified is January 6, 2022 - 11 days ago. I published that article on my website on January 9, 2022.

Since that article, I have written and published four more articles - 2 on January 11, 1 on January 12, and 1 on January 14. All four of those articles have disappeared from Scrivener in the active project file and the backups.

My Scrivener version is 3.2.3. I’m on a Mac running Catalina 10.15.7.

Something strange is going on. What could it possibly be?

Before you do anything else, I recommend we do a Zoom session to iron out possibilities.

Zoom me

Thanks. I would prefer to communicate via this forum if possible.

Your choice, but ten minutes Zoom can solve things you can never adequately describe in text messages.

This seems like a different kind of problem in that case. Originally there was a file, but for some reason it wasn’t loading properly and you were able to restore the text, but now it seems there are no files at all.

None of what transpired above will be of any use if that is the case, and this should be treated more like a situation where some third-party tool is deleting Scrivener data. Definitely move your projects out of any cloud sync folders to begin with, to eliminate whether that is a factor, and switch off any utilities that might be running non-Apple certified “maintenance” or “cleaning”, such as CleanMyMac. If you have the option to do so, try using another drive for work for a bit, too.

And I’d recommend searching the forum for blank file issues, as this is not an uncommon issue, given how many people use tools that basically delete stuff automatically out of some ideal of keeping your drive “clean” or “optimised”. There is plenty of troubleshooting out there to look into.

I will move the files out of Dropbox. I do use CleanMyMac X and have used it for several years with no problems at all. I will double check if any settings have changed and will test without it for a while, though.

Thanks.

Dropbox should be safe to use, however if you do make use of the “Smart Sync” feature, it is recommended not to when working with Mac file formats that store their data in lots of files, like Scrivener does. If you don’t see the setting anywhere, your account type may not have access to it and it isn’t something to worry about.

CleanMyMac can be okay, but it has been known to cause problems with projects stored on the Desktop, since it does try to keep that folder clean. It doesn’t sound like that is the case here, since the Dropbox folder shouldn’t be within the Desktop folder. But it’s worth double-checking its settings if you find switching it off improves the situation.

This may not be significant, but the files that are missing are the only ones that were written after I updated Scrivener (when you noticed my version wasn’t up to date). Is it possible something about the update didn’t go quite right? It’s possibly insignificant, but those files were there, or at least displaying content in the binder and editor prior to creating those empty documents with titles only yesterday.

If you’d like to reinstall from a fresh download, there is no harm in trying. I don’t think that there is any relation between creating binder items and losing content in other items, though if you see that happening consistently, over and over, we could take a closer look at that.

Thank you. I’ll try that.