Tags: apparent crash

My tags seem to have gone wrong. I can’t rename tags and when it try to enter new ones each word appears as a separte tag. I get this message:
{“msg”:“unhandled error: unknown selection mode: “clear””,“stack”:“Error: unknown selection mode: “clear”\n at select (/Applications/Tropy.app/Contents/Resources/app.asar/lib/main-928d2394.js:10005:13)\n at nav (/Applications/Tropy.app/Contents/Resources/app.asar/lib/main-928d2394.js:10164:15)\n at combination (/Applications/Tropy.app/Contents/Resources/app.asar/lib/main-928d2394.js:8577:29)\n at dispatch (/Applications/Tropy.app/Contents/Resources/app.asar/lib/main-928d2394.js:8400:22)\n at /Applications/Tropy.app/Contents/Resources/app.asar/lib/storage-2ebe4a58.js:4729:22\n at /Applications/Tropy.app/Contents/Resources/app.asar/lib/storage-2ebe4a58.js:2858:12\n at /Applications/Tropy.app/Contents/Resources/app.asar/lib/storage-2ebe4a58.js:2814:12\n at /Applications/Tropy.app/Contents/Resources/app.asar/lib/main-928d2394.js:8781:16\n at /Applications/Tropy.app/Contents/Resources/app.asar/lib/storage-2ebe4a58.js:2824:51\n at /Applications/Tropy.app/Contents/Resources/app.asar/lib/form-ed2191f9.js:668:51\n at onTagSelect (/Applications/Tropy.app/Contents/Resources/app.asar/lib/project-de46fd52.js:63516:5)\n at handleClick (/Applications/Tropy.app/Contents/Resources/app.asar/lib/project-de46fd52.js:27433:5)\n at Object.ba$1 (/Applications/Tropy.app/Contents/Resources/app.asar/lib/main-928d2394.js:919:7)\n at ja (/Applications/Tropy.app/Contents/Resources/app.asar/lib/main-928d2394.js:939:8)\n at ka (/Applications/Tropy.app/Contents/Resources/app.asar/lib/main-928d2394.js:943:6)\n at oa (/Applications/Tropy.app/Contents/Resources/app.asar/lib/main-928d2394.js:963:3)”,“system”:“Darwin 19.6.0 (x64)”,“time”:1603882152649,“version”:“1.8.1”}

Thanks for reporting!

There is a bug (which results in the error message) when you right-click on a tag that is already selected; because of the error message, the context menu is closed, so the best way to workaround this problem at the moment is to clear the selection before opening the context menu on the tag. For example, click on the project name in the top left to clear the currently selected lists and tags and then right-click on the tag you want to rename: this way it should work. We’ll fix this right away of course.

I could create new tags with multiple words just fine. How did you create the tag that was split into separate words? I suspect you were adding tags using the tag-adder widget in the panel to the right: we’ve recently added a long requested feature there to support adding multiple tags at once by entering a list of tag names. I suspect you were creating a new tag consisting of multiple words separated by either a comma or semicolon? In this case, these tags would have been created as separate tags.

If you want to use commas or semicolons in your tags you can still do so, but you need to create the tags before using them in the tag-adder widget. If you right click in the sidebar and select ‘New Tag’ you can then create the tag with semicolons/commas. Once the tag exists you can add via the tag-adder by entering the name or using the auto-completion.

1 Like

Thank you for your prompt reply.

As far as I can see, I have not taken the actions you have mentioned to cause the error message. I can’t see that I have done anything differently from what I have done before. I have done as you suggested below but as soon as I right-click, I get the error message. This means that I can neither rename nor delete tags.

I think the reason why the tags are now separating is the use of commas but it hasn’t happened before. For example, I had come across various references to a man named ‘Vischer’ but I didn’t know who he was. Now I have more precise information and his full name is Sir Hanns Vischer, For weeks I have easily changed this tag entry to ‘Vischer, Sir Hanns’. Now I can’t. And when I tried to make a new entry under ‘Vischer, Sir Hanns’, it separated into an entry for ‘Vischer’, unchanged, and a new one for ‘Sir Hanns’. I can still make a new entry under Hanns Vischer (Sir) but I can neither delete nor change the other entries.

Up to now I have been able to enter a new tag as I work on a document, rather than going out of it to create a new tag. I can still do this.

I can’t help wondering if my problem arises from your recent changes to Tropy, or is it simply coincidence that my difficulty has arisen on the same day as you have posted updates to Tropy?

Yes, both these issues are caused by the recent Tropy update – it’s not that you’re doing anything wrong! But there are two separated issues here: one is simply a bug in the software, which will be fixed with the next update; the other is a change in how the tag-adder widget in the panel works. Let’s discuss them separately:

One issue is that you can’t rename or delete tags, because of the error message. Like I said, this is simply on us and will be fixed, but fortunately you can work around it easily: the error will only happen if you right-click on the tag while it is already selected; so to work around this you need to clear the selection first, then right-click on the tag and all the actions from the menu will work fine. Here are two screenshots to illustrate what I mean:

Screenshot from 2020-10-29 08-58-16

Here, if I want to rename/delete any of the tags which are not selected, e.g., the ‘Planets’ tag, I can just right-click the tag: this will select the tag and open the context menu and everything should just work. However, if I want to rename the ‘NASA’ tag and right-click on it, this will cause the error you’ve reported. So to work around it, I need to first click on any other tag, or on the ‘Tropy Sample Project’ above (this clears all tag selections) to deselect the ‘NASA’ tag and only then right-click on it.

To delete a tag you can also just left-click on it and then hit backspace on the keyboard.

Now to address the second issue of creating new tags which contain commas.

Screenshot from 2020-10-29 09-06-25

The latest update included a change how this widget works: entering ‘One, two, theee’ like in the screenshot above will create three separate tags and add each of them to the currently selected items. This is a change that has been requested by many users for long time, but making the change we were concerned about users, such as yourself, who want to use commas in tag names. The compromise we came up with is to still allow you to use commas in tag names, with the caveat that they can’t be created via the tag-adder widget. For example:

Screenshot from 2020-10-29 09-13-36

Here is a similar case as before, but I have first created a tag called ‘One, Two, Three’ in the sidebar. Now that this tag exists, the tag-adder suggests it to me as I type ‘one, two’ and I can just add it via the auto-completion. I can also type the full name ‘one, two, three’ (lettercase is ignored) as in the earlier example and this would then add the single tag (not create three separate ones).

We’ve had an idea in the meantime how to support commas in the tag adder: we could make it so that committing via the Enter key always tries to add/create the tag as whole (as it was before) and only if you commit via Shift+Enter we would split up the input into separate strings. That should bring back the old behavior, while still supporting the advanced usage.

Thanks. That sounds helpful.