Sorter: Contents change spontaneously

I have 8 groups in the Sorter, each from a different database; call them A - H:

  • A
  • B
  • C
  • D
  • E
  • F
  • G
  • H

Once the list of groups is set, I rarely change it or the order of the items.

Unpredictably and without warning or error message and without any action on my part, one group will disappear and be replaced by a duplicate of another (the specifics vary from incident to incident):

  • A
  • B
  • B
  • D
  • E
  • F
  • G
  • H

So, I fix it by deleting one copy of B and adding C again. A few days later, the list will spontaneously change again.

Other times, the order of the items will change, again, for no reason, with no error message, and without my taking any action.

Why does this happen? What is the cure?

Is it possible that at one point you created one (or more) of these databases by copying an existing database?

Perhaps. I recently set up a database to use to base future databases upon. My procedure would be to duplicate the database in Finder, rename it, move it to an appropriate location, and open it in DTPO and set the database name and so forth. From looking at the Date Created time stamps in Finder, it seems that three databases that I have open all the time are based on the template database, and two of them are involved in the duplicate/missing database problem of today (one is missing, and the other duplicated in the Sorter).

However, these problems of databases spontaneously disappearing and sort order spontaneously changing have occurred many times prior to using this method to duplicate my template database.

At one point (many months ago), Devon sent me an updated Sorter (to fix other problems I was having with the Sorter) which seemed to work well and seemed stable, but I expect this has been overwritten by the update process.


I just checked all of the databases to make sure they have unique names in their Database Properties dialog. (That is: in the Sidebar, right-click on a database name, select Database Properties, and check the Name.) They all have unique names.

All of the groups in the Sorter are Inboxes, but they are all uniquely named using the format:

_Inbox - Database Name

That is:

_Inbox - Database A
_Inbox - Database B
_Inbox - Database C
and so forth.

(The Global Inbox’s name is simply Inbox.)

(I use the leading underscore to get the Inbox to bubble up to the top of the alpha-sorted Groups list in each database.)

Databases duplicated that way have the same UUID (unique IDs for each database, group, and record). This can confuse matters, and it’s possible Sorter isn’t able to distinguish one group from another because they have the same UUID. Is it feasible that the problem you described happens after some sequence of opening and closing databases or DEVONthink? You might want to consider creating new databases from scratch and moving your groups from one of the duplicated (templated) databases to a new database.

Bingo, korm! I wrote a script that gets the UUID of each open database. It shows that the two databases in question (one missing in the Sorter, the other duplicated) do have identical UUIDs.

I will recreate one of the databases, and check all of my databases for duplicate UUIDs.

All of which raises a few questions:

  1. What is the best practice for basing a new database upon a template?
  2. Why does the Sorter lose the order of its items? Is this a UUID-related issue?
  3. Just how many decades have you been using DT anyway? You have an immense amount of knowledge. Thanks very much for your help.

Here is the script, which I include as a resource for future sufferers of this problem.

-- get the UUID of every open database, assemble them all into a string, and paste the string into a TextEdit document.

tell application id "com.devon-technologies.thinkpro2"
		set allDBs to every database
		set theResult to ""
		repeat with theDB in allDBs
			-- get the UUID of every open database, ...
			set theDBName to name of theDB
			set theUUID to uuid of database theDBName
			-- ... assemble them all into a string, ...
			set theResult to theResult & theUUID & " (" & theDBName & ")" & return
		end repeat
	on error error_message number error_number
		if the error_number is not -128 then display alert "DEVONthink Pro" message error_message as warning
	end try
end tell

-- ... and paste the string into a TextEdit document.
set the clipboard to theResult
tell application "TextEdit"
	set theDoc to make new document
	set text of front document to the clipboard
end tell

Templates. Making a database by cloning an existing database could have unknown side effects (like this problem), so I’d think it’s better to make a new database and then add groups, tags, and other features using custom templates along the lines of the “Classifications” templates that ship with DEVONthink. Or you can clone groups by using Duplicate – you could have a “template” database and duplicate groups from there into a new database. Because I’ve done most of my tagging in the Global Inbox, the Tags group there has a tags population that represents just about every tag I use. So, I duplicate Tags from the Global Inbox when I want to carry over that structure to a new database – though that also generates an amount of cruft to clear up.

Sorter order. I don’t know why Sorter loses its mind. The beginning section of the Sorter plist in /Preferences contains the order of groups (using their group UUIDs). You could always keep a safety backup of the Sorter plist and whenever Sorter goes haywire, just shut it down and clone your backup plist, and you should be back in business. (Though, you’ll lose a record of any application-specific full-screen settings you saved since the time the plist was cloned.)

Glad to be of help. The DEVONthink user community is one of the most thorough and helpful around, IMO.

Me neither … Devon, any chance of a fix for this? Thanks.

Thanks for the tips, korm.