Problem
1.
- Create a node with no tags.
- Attempt to add a tag and preview. (Experience your term showing up in preview with a link to "/taxonomy/term" - note no tid, this is expected)
2.
- Save the node, now it has a tag.
- Go back and edit and try to add more tags. Experience none of the new tags showing up in the preview. BUG
3.
- Attempt to rename the existing tag too. Now you get Fatal error: Call to a member function uri() on a non-object in .../core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/field/formatter/LinkFormatter.php on line 46
The code that was ported from Drupal 7 seems to have been ignoring that terms that does not exist yet might be somehow on the entity. The logic to maintain the display of 'autocreate' terms (where this value is used for the tid) is there, but there is nowhere to create the autocreate tid. The word 'autocreate' only appears in conditions and comments in core and no assignment is done with this value as far as I've found.
Proposal
Figure out how to pass around these new terms properly. Don't filter them out on a whim. Write tests.