Import error, New states cannot be added to system workflows


When a customer tries to make a copy of an existing portal, he is able to export the portal, but the import into a new/blank site never completes. Looking at the Admin Logs, the customer can see multiple Scheduler Exceptions with the message "New states cannot be added to system workflows."


The issue is usually related to a default workflows on the source site. For example the "save draft" by default this workflow only has 2 sates one for Draft and another for Published; nevertheless, if the customer has an additional state. When the import process attempts to add this one is when it fails.

Therefore, the recommendation is to delete this extra state from that default workflow and run the export again. 

CAVEAT: To maintain best practice make sure to backup your database, and test in a development environment if possible.

Since this state is part of a system workflow, the UI does not provide a way to remove the state, and we would need to run the following in SSMS or Settings > SQL Console.

DELETE FROM ContentWorkflowStates WHERE StateID = <Fill in here the state id>;
DELETE FROM ContentWorkflowStatePermission WHERE StateID = <Fill in here the state id>;

Once this is completed clear cache by going to Settings > Servers, verify that the default workflows only have the default states (Settings > Workflows), and run the export/import process once again.



Please sign in to leave a comment.