Author Topic: Preferences not saved  (Read 6275 times)

jodybingo

  • Hero Member
  • *****
  • Posts: 667
    • View Profile
    • Personal Web Site
Preferences not saved
« on: August 09, 2017, 01:41:13 PM »
Hi Corey, one copy of TD loses my saved preferences every time I restart TD. I have set the prefs.sav to Read Only and get an error when TD starts. Is there anything I can do before purging TD from my laptop and starting over?
« Last Edit: August 09, 2017, 01:45:43 PM by jodybingo »

Corey Cooper

  • Administrator
  • Hero Member
  • *****
  • Posts: 6216
    • View Profile
Re: Preferences not saved
« Reply #1 on: August 10, 2017, 10:11:35 PM »
If you set the preferences file to read-only, the TD will not be able to save your preferences (it can't write over a read-only file).  In other words, that seems like an expected error.

I can only assume you set it as read-only because it seems to lose them when you restart?

jodybingo

  • Hero Member
  • *****
  • Posts: 667
    • View Profile
    • Personal Web Site
Re: Preferences not saved
« Reply #2 on: August 11, 2017, 08:06:30 AM »
I set it to read only hoping TD wouldn't overwrite my settings then when TD gor upset with me for doing that I unchecked the Read Only box.
But nontheless whenever I shut down my preferences reset.
As a side note, the receipts do not reset to the default, but to an earlier receipt template I used

Corey Cooper

  • Administrator
  • Hero Member
  • *****
  • Posts: 6216
    • View Profile
Re: Preferences not saved
« Reply #3 on: August 14, 2017, 02:59:27 PM »
That is even stranger, because it sounds like it is reading a different preferences file than you are expecting.  Yet, at the same time, it errors when it is unable to write over the preferences file you ARE expecting.

Do you have a "config.properties" file in your Tournament Director install folder?

jodybingo

  • Hero Member
  • *****
  • Posts: 667
    • View Profile
    • Personal Web Site
Re: Preferences not saved
« Reply #4 on: August 15, 2017, 11:32:05 AM »
Hi Corey, I cannot find any config.properties in my install folder. I checked on another installation that does not lose the preferences and cannot find config.properties either

Corey Cooper

  • Administrator
  • Hero Member
  • *****
  • Posts: 6216
    • View Profile
Re: Preferences not saved
« Reply #5 on: August 15, 2017, 02:24:36 PM »
There is an option that can be used to move where the application save your preferences.  If no config.properties file, then that option is not being used.  That tells me it is using the standard location, which was suspected since the application complained when the preferences file was read-only.

If the preferences file was being corrupted, you would see two things: (1) the TD would complain on startup that it was unable to load your preferences, and (2) you would see backup preference files being created.  When the TD can't load the preferences, it used to simply create a new set of preferences and overwrite the old one (effectively losing your personalized preferences, but the file was corrupted so not much could be done anyway).  Now (v3.3) it will copy the original preferences file (prefs.sav) to a file with a timestamp (prefs.sav.20170815-132135) and then create a new preferences file.  So you should see some of those files where your preferences file is saved.  If not (1) and (2), there doesn't seem to be a problem with the preferences file.

What preference(s) are being reset that makes you think the application is not saving your preferences?  Maybe it's a misunderstanding (I know you know the app pretty well but, well, you never know)?

jodybingo

  • Hero Member
  • *****
  • Posts: 667
    • View Profile
    • Personal Web Site
Re: Preferences not saved
« Reply #6 on: August 15, 2017, 03:10:59 PM »
Preferences not being saved include:
1 - Paid in Full checked by default
2 - Buy in players Now checked by defaut
3 - Auto-Seat checked by default
4 - Enable auto print
5 - Buy-in Receipt Template (oddly, it reverts to an older template I used)
6 - Rebuy Receipt Template
There may be others but these are the ones I have to reset to my preferences after loading TD.

//There is an option that can be used to move where the application save your preferences.  If no config.properties file, then that option is not being used.//
How do I go about creating/editing this config.properties file? It would be great to have my TD preferences identical on both machines

Corey Cooper

  • Administrator
  • Hero Member
  • *****
  • Posts: 6216
    • View Profile
Re: Preferences not saved
« Reply #7 on: August 15, 2017, 05:40:10 PM »
That's pretty baffling, to be honest.  It would make [more] sense if you were losing all preferences, but even then it's strange.  Particularly if it is reverting back to some older preference (your reference to the buy-in receipt template).  I'd lean towards some other process/program replacing the file after you quit the TD.  Almost like a backup program restoring the file.  Does the receipt number revert as well or does it keep incrementing?

As for changing the preferences file location, I forgot that config.properties was for debugging and it only allows for for selecting between two locations, not specifying your own.  But there is a way to specify your own.  In the TD install folder (where TD.exe lives), create a text file named "preferenceFilesOverride.txt".  Edit the file and add a line like this:

preferences=C:\Users\jodybingo\Documents\myPrefs.sav

You should be able to map a network drive or simply use a UNC path:

preferences=\\myfileserver\tdshare\sharedPrefs.sav

You can also change where the full-screen preference is kept (it is separate from the preferences file) by specifying it using "prefsfs":

prefsfs=C:\temp\fullscreen.pref

And also where the Data Stores config file lives:

datastore=\\myfileserver\tdshare\dataStores.txt

Edit: This is actually in the user manual, for future reference.  Near the end in the Advanced Customization section.
« Last Edit: August 15, 2017, 05:41:49 PM by Corey Cooper »

jodybingo

  • Hero Member
  • *****
  • Posts: 667
    • View Profile
    • Personal Web Site
Re: Preferences not saved
« Reply #8 on: August 15, 2017, 06:57:31 PM »
//I'd lean towards some other process/program replacing the file after you quit the TD.  Almost like a backup program restoring the file.//
I do not have any backup restoration programs installed. But as I write this i thought about W7 and Previous Versions. I checked on the Previous versions Tab for my TD folder where my pref.sav is and I found multiple entries for one day. I wonder if Windows is reverting that to an earlier version on its own. I am going to turn it off and see what happens after restarting it (can't do it until later)

jodybingo

  • Hero Member
  • *****
  • Posts: 667
    • View Profile
    • Personal Web Site
Re: Preferences not saved
« Reply #9 on: August 16, 2017, 09:49:38 AM »
After turning off System Protection and restarting TD my preferences were not reset!!

Corey Cooper

  • Administrator
  • Hero Member
  • *****
  • Posts: 6216
    • View Profile
Re: Preferences not saved
« Reply #10 on: August 17, 2017, 05:29:37 PM »
Yay it's not the TD's fault!

Oh and yay it's fixed!  ;)