We noticed during testing that some times when content authors update content, terms they don't have access to (But already existing on the entity) will be removed from the entity when they saved.
The root of the issue seems to be that the permissions_by_term_options_list_alter function is removing terms from the list that the user doesn't have access to. So when the content item is saved, the terms are lost. My proposed resolution is that in the existing validation function, we can compare the new terms to the ones currently associated to the entity. Then take any terms already associated to the entity that we don't have access to, and re-add them. That way nothing is lost on save and they can still remove terms they do have access to. That's what the attached patch does.
Needs review
2.34
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.