Duplicated Category or Publication error while importing content packs in Finder
During the import of a content pack into Finder, getting an error message saying "duplicate key value violates unique constraint"
Unfortunately, this is a duplication of a key value in the Portal database, we need to be very careful and follow certain steps to avoid breaking anything or removing unwanted content, hence it needs to be done by involving the support team in a remote session.
However, by providing the outputs and information requested in the steps below, we can greatly speed up the resolution.
Connect to the Portal Appliance through CLI as a root user.
sudo psql -U portal -d portal -c "select id, unique_key from cm.document where collection = 'fields';" > AllCategories.txt
sudo psql -U portal -d portal -c "select id, uid, unique_key from cm.document where collection = 'publications';" > AllPublications.txt
2. Provide the following output to the support team in the ticket together with the screenshot of the error message.
Note: If you don’t have access to the Portal (you are using the Nexthink Experience) please contact Nexthink Support in such case.