How to prevent taxonomy terms being duplicated on node form? I have a content type book and it has two taxonomy term reference fields (free tagging, autocomplete):

author
publisher

Both two taxonomy reference fields have taxonomy terms from the same vocabulary: people.
While creating new book content, if I enter the same taxonomy term for both author and publisher, it double creates the same taxonomy term (if  entered taxonomy term didn't exist before).
I don't want to use different vocabularies for these taxonomy reference fields.
How to prevent taxonomy terms being duplicated on node form?
Though there is a module for help with taxonomy term being duplicate here, but like module page says, it doesn't work apart from taxonomy term and vocabulary forms.

So a solution I can think of in your scenario is to use hook_node_presave and compare value of both fields. If it match, you can think of some logic such as, create single term &amp; set newly created tag for both fields.

Other hook can also help you such as hook_node_insert with your own logic to tackle this. Happy Coding !!