Project Target word count Resetting after Close

I have an older file that was upgraded from 2.0 to 3.0

When I close the file, it saves no problem. But when I open it again, the project word count (set on the compile group) shows the entire project, instead of the singular book. When I go to the compile screen to re-save, it’s showing just the one book.

Obviously, re-saving the compile settings brings it back to normal, and it’s not a work-stoppage. But it is annoying to have to re-set every time I open the document.

That doesn’t look like a common problem. I set up a project in v2 with the specified settings, then closed and opened it in v3. Upon completion of the project upgrade process, I opened Project Targets, and found my designed compile group folder correctly listed, and the word count matches what it should. It is all working as expected in other words, with all settings copied over and functional on initial load, as well as subsequent reloads.

Have you attempted to “reset” things a bit? I’d try setting the compile group back to Draft and save compile settings, then go into Project Targets options and disable the compile group setting. Reload the project, set everything back up the way it should be, and do another reload.

Another place to check is Project ▸ Statistics…. You will need to set Count current compile group only in the “Options” tab. Once you do that, add checking this to your reload procedure. Does it differ from Targets?

Re-setting the settings seems to have worked. I’ll let you know if I come across anything more.

Okay, the issue seems to come after the midnight hour because although it was fine yesterday, today it’s back to where it was. Any thoughts?

Hmm, does this mean the settings have reverted after midnight, or that the settings appear fine but the effects they should be having are not happening?

We potentially do have some issue around midnight with session tracking. This specific aspect isn’t something I’ve heard of before, but there are a few reports now of the Writing History feature losing track of the day’s progress on a sporadic basis—seemingly after or near around where a session reset would occur.

If you open Project ▸ Writing History… and look through the dailies, are there any days that stand out as being in error? Perhaps you know you wrote a significant amount on Friday, but it states “0” or a small number like “12”.

Settings have reverted after midnight. Closing and opening it multiple times in the same day (even shutting down the program and reopening it) have no effect.

I know that when Scrivener crashes, it does reset my total word counts for the day, although it keeps my words in draft.

The ongoing session count should be tallied into the main internal storage file every time the project autosaves—so in theory that number should be as predictably stored as the title of a document in the binder, a label assignment, etc. So if you aren’t losing that kind of information in a crash, that would indicate it is a problem with the record keeping of that specific feature.

The actual words themselves are stored in separate files, so it would take a much bigger problem for those not to be saved before a crash occurs.

If you haven’t done so already, go into the General: Warnings preference pane, and toggle Show internal alerts on, then restart Scrivener to ensure a clean session. If something goes wrong with the counter and causes it to stop writing your progress to files, you should get an error window with some diagnostic data (which you can copy and paste here).

This is what I get in the window when I open the file for the first time.
Screen Shot 2018-11-27 at 4.06.54 PM.png

Sorry for the delay, I’ve been on holiday. So I take it “Razia Omnibus” is what you’ve renamed the Draft folder to, it represents several books as subfolders within it, and we should be seeing “Some Book Folder Target” above the progress bar? That is how I’ve understood your explanation of the problem, but I’m still no closer in figuring out why the compile group setting seems to be obscured from this tool, every time you reload the project.

Here is what I would try:

  1. Use File ▸ Save As… to create a new copy of the project, one that you can more freely test with and discard. I’d put it somewhere obviously temporary, like Downloads, and give it a name that won’t be confused with the main project. You might also want to go into Project Settings: Backups, and disable backups for the copy.
  2. Close the project and reopen it. Verify that the problem still exists. If so, close it again.
  3. In Finder, navigate to the project and right-click on it, selecting “Show Package Contents”.
  4. A window will pop up showing the internal components of the project. Drill into the Settings folder.
  5. Drag the “compile.xml” file to the trash.
  6. Load the test project. The Target window will point to the Draft, but that’s okay because we just discarded all of the compile settings for this project.
  7. So go into Compile and select a book subfolder.
  8. Reload the project.

If that all works, and the test project now acts normally, you could consider using the same procedure on your main project. Just take note that you will lose all of the settings in the main compile overview screen. Any custom formats you created are separate, no worries there, but the assignments between Layouts and Types, as well as compile group, filters, front matter, all of the checkboxes, ebook cover pages—all of that stuff will be gone. So this is a bit of a last resort measure, but if you don’t have many changed made to your settings it may be worth doing so.

Hey again, I know it’s been a while since I posted, but I am yet again having this same problem with a file. I completed the steps listed on a dummy file and am still getting the same error:

Here’s the set-up:

I have six books in the same series in one Scrivener File
This file was converted from Scrivener 2 to 3 (have not had the same issue with files created in 3)
I have the compile set to the book currently in draft
When I open the project the next morning, the “Book Target” total (showing how many total words have been written in the entire draft) shows the entire six books, instead of the one in work
I venture to Compile Settings, resave the compile (which still shows the correct book), and the numbers reflect accurately.
Repeat every morning.

Using version 3.2.2

Sorry to say, I don’t think anyone else has reported something like this since you did initially, and you may have been the first. It seems a very rare issue, and as it seems to stem from an older project, probably not one that will crop up at this point.

Personally I’d consider migrating to a fresh new project with the File ▸ Import ▸ Scrivener Project menu command and a little preparation, getting settings moved over to the new project first (most settings and compile setups can be copied between projects with simple drag and drop, but review Appendix C.1, Copying Settings Between Projects for the details, and §15.6.6, Copying Stylesheets Between Projects, if you use styles in the main editor.

It’ll be a little extra work one day (maybe 20 minutes maximum), but that seems less hassle than having to work around a bug every morning for years. :slight_smile:

Well, if I’m the only one, then that sounds like a perfect solution, hah! Thanks again for all your help.

Okay, so this is now getting odd.

I created a new blank file. I moved the six books into the new file, along with the front and back matter. I next imported the compile settings from the previous file.

Yesterday, the Project Target was showing 24000 words. Today, back to 483000.

I’m going to experiment with the old file and see if opting for a non-custom compile setting might fix the problem. There’s no reason why the bug would have been moved over unless it was in the Compile settings I imported (which makes sense maybe?). They’re fairly custom so I don’t want to have to delete them and rebuild them.

Yeah, that’s an interesting development! Do you think it might work to create a simple example project with maybe a few dozen words and these compile settings? We could have a poke at it and see if there is something obviously wrong.

I am also having the issue where my project target resets every night after I close. If I go back into compile settings, it has the correct selection, and I can resave compile settings and it will update, but it does not carry over from day to day, reverting back to counting words written in all the projects I have in this file instead of only the compile selection.

Oh good, glad to know it’s not just me. Hah.

Removing the compile settings didn’t seem to fix the problem this morning. But nevertheless, I’ve created a dummy file with some dummy text and the compile settings. Hopefully there’s a clear issue.

Oops, forgot to update this post. I naturally had to wait a day to test your project, and ended up waiting two days on accident. :slight_smile: Good news is that I could easily reproduce it, so we’ll hopefully be able to track down what is going on with it. Thanks for the help in narrowing it down!

So if it helps, I went in and it seems to be happening to all my files (at least all the ones I tested yesterday into today). I also created a brand new file from the custom template I use, didn’t do anything with compile settings or anything, just typed a few words in 2 different “books” and it happened on that file too. Tester file attached.

One more update that might help:

So normally, I close the file and shut down my computer at night. The other day, I left both on and came back to it - and issue didn’t replicate! My daily target reset, as it should have, and the compile target was displaying the correct number, So the issue seems to occur when the program/file is closed for the day and we come back to it.

I turned off all resetting in the target settings so we’ll see if that changes anything.

Thanks, that certainly makes sense, since the issue seems to be largely resolved for the duration of the session, after the compile settings have been refreshed in the “mind” of the target setting. So they would carry on until the project was closed. It is weird it happens after midnight, but there are some daily maintenance tasks that run in this panel since it does do deadline tracking and such.

But since we have a way to reproduce it, it probably doesn’t require any further investigation. It’s a simple matter of tracking what happens with the debugging tools. Thanks for continuing to look into it though, you never know when a clue might help.