Reenable adding/editing related topics for docs, notes

Also fix bug when editing documents where the "zotero_link" attribute
was not being set properly