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:

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

Current modules being used for revision:

  1. workbench
  2. workbench_moderation
  • 2
    If this is like you describe perhaps it should be reported as a bug in the drupal core issue queue. Have you tried reproducing this behaviour with a clean install and minimal modules enabled ? perhaps it could be the fault of a contrib module ? – GiorgosK Mar 7 '19 at 19:07

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.

  • we are using workbench and workbench_moderation that may impact it, but I have not seen any issues yet. I will check again. – usernameabc Mar 8 '19 at 17:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.