Cancelling user account set draft pages to published When we cancelled a user account using the Delete the account and make its content belong to the Anonymous user method, we found that the author was set to Anonymous for the pages they were set as the Author, as expected. The problem is that many pages that were set to Draft were then updated to have their Author set to Anonymous and published, which is not a desired outcome. These drafts were never published and always kept in that state. 

We have a view that pulls all pages that are published and content type = Basic Page. This started to pull in all the draft pages because they were set to published after the user account was cancelled. 

How can we cancel an account without publishing pages that were are set to Draft moderation state?

Steps to reproduce:


Create 10 draft  Basic Pages (do not publish) where the Author is set to content admin
Cancel the user account for content admin by using Delete the account and make its content belong to the Anonymous user method. 
Under /admin/content, observe the pages are now in published state with Author set to Anonymous


Current modules being used for revision:


workbench
workbench_moderation
Just did a test with the steps you provided.  I tried with just 1 node unpublished and cancelled the user and the node was assigned to the anonymous user BUT the node stayed unpublished.  I don't see any reason why the result would be any different if I tried with 10 nodes.

I believe a contrib/custom module is at fault.  See if you have any modules that deal with publishing/unpublishing content you have to disable them and test if the problem is gone.

If the above does not help I would try to disable all modules one by one and testing to see if the problem is gone on each step.  Once you find the problematic module you can post the results in the issue queue and you might also discover a patch resolving the issue.

You can also post a list of your enabled modules and someone might be able to spot a module that could be a potential candidate to be causing this behaviour.