fixes #6057 Can not save content as anonymous

Fixed the issue and pushed the code for review, please check it.