update handling of CMS published/unpublished and visibility