Okay, all of this is pretty straightforward.
How can I restore the playlist field? I guess the easiest/only way is to use a library backup from MC 22 and export/import the playlists from that version, or?
As you have been running MC23 for a couple of months, no doubt you have made lots of changes to your Library since the last MC22 backup. So yes, export/import of the Playlists is the best way to restore them.
Backup your MC23 Library first of course.
Restore your last MC22 backup.
Export all your Playlists from MC22. That will create separate files for each Playlist and SmartList in a directory something like "C:\Users\[UserID]\AppData\Roaming\J River\Media Center 23\Library\Playlists".
Restore the MC23 backup you made above.
Import only the Playlists that you want to fix. Note that this seems to create a new Playlist under the "Imported Playlist" group rather than merge Playlists of the same name. So you may need to do some work merging the Playlists manually, or just replace the current Playlist with the imported one. There doesn't appear to be an automatic Playlist merge process, but you can just drag and drop between the two versions and if that creates duplicates, just click the "Remove Duplicates" button to fix the issue. Then delete the Playlist you no longer need.
How can I prevent this from happening again? What can I check/control? Any precautions to take?
You said;
Furthermore, I've had some problems with my external hard drives now and then. If it turns out that 'Fix broken links' is not foolproof, could it even had led to files removal?
Which I take to mean that sometimes your external hard drives weren't visible in Windows, or maybe Windows gave them the wrong drive letter at boot time, and therefore MC couldn't find the drive it expected. In that case, and when you have "Fix Broken Links" set to "Yes" in Auto Import, and Auto Import is set to run in the background, this is what happens.
You create a Playlist with tracks in your Library. MC actually just creates a record of the Playlists a file belongs to in its [Playlists] tag.
You close MC and probably shut down your PC.
Some time later you start your PC and MC, or MC starts with Windows.
But your external hard drive is having some trouble. Perhaps slow to start, or just doesn't get detected by Windows straight away, or is given a different drive letter to the previous value.
MC detects that it can't find files on your external hard drive, because it can't find the drive. It removes the files it can't find from your Library. Of course, it doesn't delete the files from the hard drive.
Your external hard drive finally makes an appearance, either soon after the above happened, or some time later. Maybe even another day. Or you fix the drive letter assignment in Windows.
MC imports the files it has now found on your external hard drive. But it doesn't restore the values in the Playlists tag, even though it knows what the previous values were, as it has stored them in the Removed database in the MC Library.
1End result: All your tracks are still in your MC Library, but lots of tracks have disappeared from your Playlists.
So, as long as you are having trouble with your external hard drives you need to change the "Fix Broken Links" to either "Yes (protect files on missing drives)" or "No". I prefer to use "Yes (protect files on missing drives)".
If you are having this sort of trouble with
your external hard drives though, you had better fix that. It may be that they
are about to fail completely. Of course, you have full and up to date backups of all your music files, right?
And what about other fields? Could some more data has been affected? I have only noticed the empty playlist field so far.
Interesting question. As noted, MC knows what tracks have been removed from its Library. I am assuming that it also knows what tracks it has removed from the Library because it couldn't find them. That would seem a reasonable assumption. Are there other tags that don't get restored when a track is removed and re-imported? Maybe, but probably not. MC seems to pretty reliably reinstate tags when it re-imports a track that it previously knew about. I think the [Playlists] tag is a special case, for the reasons outlined in the Note below.
Note 1: I have to assume that this was a design decision, so that files re-imported into MC aren't automatically added back into the Playlists that they previously belonged to. That seems like a reasonable decision, as otherwise you would just start to see old files pop back up in Playlists without expecting them to. Imagine deleting files that you used to love but now hated from your "Favourites" Playlist, only to decide later to re-imported them so you can play them occassionally, only to have them start playing again when you play your Favourites? Could be heartbreaking, depending on the provinence of the track.