Applying a child keyword but Scrivener inserts the Parent keyword instead

I searched for this bug, did not find it. Sorry, it’s a bit complicated.

Edited: using version 3.1.5, on MacOS.

Using a text editor (BBEdit), I generated a large collection of keywords and organized them in three groups. I did that so I could alphabetically sort each group of child keywords before moving them to Scrivener. Scrivener word sort them all en masse. One at a time, I created a Parent keyword node in the Scrivener Project Keywords window. Then I pasted the relevant subset of child keywords into the Project Keywords window, then dragged them into position beneath their Parent. Success for all three Parent groups.

Now I find that, for one of these parent nodes, when I try to apply a child keyword to the current document, it inserts the Parent keyword instead. Oddly, this only happens for a subset of the child keywords in that group (9 of 22). This happens if I use the Gear dropdown menu > Add Keyword > Parent Keyword > child keyword. And also if I drag and drop the child keyword from the Project Keyword window to the Keywords pane in the document inspector.

Debugging: for the buggy group, I selected all 22 child keywords in the Project Keywords window, then dragged them to the Keywords pane in the inspector. Only one of the child keywords showed up in the inspector pane. I tested that for the other two groups of keywords and Scrivener applied all keywords, as expected.

This bug might be related to the fact that some of the child keywords were already being used before I made the three groupings. But I was careful to omit those particular keywords before pasting in the new list. Once the relevant keyword group was created, I drag and dropped the pre-existing keywords under the parent.

I am wondering how to fix this. It might be OK to delete all of the keywords in buggy group from the Project, including the parent keyword, and start over. I don’t have a large database yet, could reapply the keywords as needed.

It’s quite possible it won’t make any difference but the latest version of Scrivener for Mac is 3.2.1 so you might just try updating to that.

Stephen

There is one intentional behaviour that would cause the parent keyword(s) to assign, but it would do so in a way that would assign both the dragged keyword and its parents: you hold down the Option key when dragging. But that doesn’t sound like what you are describing, and I mention it mainly for the sake of completion.

It definitely sounds like something is messed up with that group—like their internal ID numbers are conflicting or something. Rebuilding that list is the route I would take as well, and it shouldn’t be as difficult to do now that you’ve got them into Scrivener. Here is how I’d do it:

  1. Create a new project from the Blank starter. You’ll trash this one you’re done with the checklist, so save it anywhere.
  2. Open both projects, and in both, open their Project ▸ Project Keywords… panels side by side.
  3. Drag and drop the entire group from the original project into the blank list. This will retain organisation and any custom colour settings.
  4. In the original project, delete the entire group that is causing issues. You’ll get a warning if any are in use, but it sounds like they haven’t been of much use yet anyway.
  5. At this point, to play it safe, I’d reload the original project.
  6. Open its keywords panel again, and drag back from the blank project.

That should in theory reset the internal ID numbers correctly (assuming that is the problem).

Thanks AmberV, I followed your instructions and now have a functional subgroup of keywords in my original project file.
Busy re-applying keywords, ugh!

Best,
M.